Nuxt/bin/nuxt
Sébastien Chopin e6c3ef11be lint bin
2017-01-20 12:43:48 +01:00

25 lines
343 B
JavaScript
Executable File

#!/usr/bin/env node
var join = require('path').join
var defaultCommand = 'dev'
var commands = new Set([
defaultCommand,
'init',
'build',
'start',
'generate'
])
var cmd = process.argv[2]
if (commands.has(cmd)) {
process.argv.splice(2, 1)
} else {
cmd = defaultCommand
}
var bin = join(__dirname, 'nuxt-' + cmd)
require(bin)