Add open argument

This commit is contained in:
brunosimon
2017-07-30 01:58:42 +02:00
parent ef8d9279af
commit d113d08433
+11 -1
View File
@@ -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