Add config option

This commit is contained in:
Typicode
2016-03-16 13:53:12 +01:00
parent ab3e611d5c
commit 841bd7f42a
2 changed files with 8 additions and 2 deletions

View File

@ -26,7 +26,7 @@
"server-destroy": "^1.0.1",
"underscore-db": "^0.9.1",
"update-notifier": "^0.5.0",
"yargs": "^3.10.0"
"yargs": "^4.2.0"
},
"devDependencies": {
"husky": "^0.6.1",

View File

@ -8,6 +8,7 @@ module.exports = function () {
updateNotifier({ pkg: pkg }).notify()
var argv = yargs
.config('config')
.usage('$0 [options] <source>')
.options({
port: {
@ -26,7 +27,7 @@ module.exports = function () {
},
routes: {
alias: 'r',
description: 'Load routes file'
description: 'Path to routes file'
},
static: {
alias: 's',
@ -57,6 +58,11 @@ module.exports = function () {
quiet: {
alias: 'q',
description: 'Suppress log messages from output'
},
config: {
alias: 'c',
description: 'Path to config file',
default: 'json-server.json'
}
})
.boolean('watch')