2016-11-08 00:18:26 +00:00
|
|
|
#!/usr/bin/env node
|
2016-11-07 01:34:58 +00:00
|
|
|
|
2016-12-09 18:40:59 +00:00
|
|
|
var join = require('path').join
|
2016-11-07 01:34:58 +00:00
|
|
|
|
2016-12-09 18:40:59 +00:00
|
|
|
var defaultCommand = 'dev'
|
|
|
|
var commands = new Set([
|
2016-11-07 01:34:58 +00:00
|
|
|
defaultCommand,
|
2016-11-09 22:59:41 +00:00
|
|
|
'init',
|
|
|
|
'build',
|
2016-11-10 11:33:52 +00:00
|
|
|
'start',
|
|
|
|
'generate'
|
2016-11-07 01:34:58 +00:00
|
|
|
])
|
|
|
|
|
2016-12-09 18:40:59 +00:00
|
|
|
var cmd = process.argv[2]
|
2016-11-07 01:34:58 +00:00
|
|
|
|
|
|
|
if (commands.has(cmd)) {
|
2017-01-20 11:43:48 +00:00
|
|
|
process.argv.splice(2, 1)
|
2016-11-07 01:34:58 +00:00
|
|
|
} else {
|
|
|
|
cmd = defaultCommand
|
|
|
|
}
|
|
|
|
|
2016-12-09 18:40:59 +00:00
|
|
|
var bin = join(__dirname, 'nuxt-' + cmd)
|
2016-11-07 01:34:58 +00:00
|
|
|
|
2017-01-20 11:43:48 +00:00
|
|
|
require(bin)
|