✨ Add open argument
This commit is contained in:
+11
-1
@@ -83,6 +83,12 @@ class App
|
||||
],
|
||||
type: 'array'
|
||||
})
|
||||
.option('open', {
|
||||
alias: 'o',
|
||||
describe: 'Open in default browser',
|
||||
default: true,
|
||||
type: 'boolean'
|
||||
})
|
||||
.option('initial-send', {
|
||||
alias: 'i',
|
||||
describe: 'Send current file in folder immediately',
|
||||
@@ -101,6 +107,7 @@ class App
|
||||
config.name = args.name
|
||||
config.port = args.port
|
||||
config.exclude = args.exclude
|
||||
config.open = args.open
|
||||
config.initialSend = args['initial-send']
|
||||
config.maxFileSize = args['max-file-size']
|
||||
|
||||
@@ -174,9 +181,12 @@ class App
|
||||
|
||||
// Open in browser
|
||||
const url = this.config.domain + '/' + project.slug
|
||||
opener(url)
|
||||
console.log('app'.green.bold + ' - ' + url.yellow)
|
||||
|
||||
if(this.config.open)
|
||||
{
|
||||
opener(url)
|
||||
}
|
||||
})
|
||||
|
||||
// Update file
|
||||
|
||||
Reference in New Issue
Block a user