mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 22:25:12 +00:00
59a0df86bf
Do not use cross-spawn, to facilitate the use of process.send node-fork for pipe communication
25 lines
343 B
JavaScript
Executable File
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);
|