Merge pull request #147 from yuchonghua/master

remove cross-spawn
This commit is contained in:
Sébastien Chopin 2017-01-20 10:31:59 +01:00 committed by GitHub
commit 45908385ad
2 changed files with 2 additions and 11 deletions

View File

@ -1,7 +1,6 @@
#!/usr/bin/env node
var join = require('path').join
var spawn = require('cross-spawn').spawn
var defaultCommand = 'dev'
var commands = new Set([
@ -13,20 +12,13 @@ var commands = new Set([
])
var cmd = process.argv[2]
var args
if (commands.has(cmd)) {
args = process.argv.slice(3)
process.argv.splice(2,1)
} else {
cmd = defaultCommand
args = process.argv.slice(2)
}
var bin = join(__dirname, 'nuxt-' + cmd)
var proc = spawn(bin, args, { stdio: 'inherit', customFds: [0, 1, 2] })
proc.on('close', (code) => process.exit(code))
proc.on('error', (err) => {
console.error(err) // eslint-disable-line no-console
process.exit(1)
})
require(bin);

View File

@ -56,7 +56,6 @@
"babel-preset-stage-2": "^6.18.0",
"chokidar": "^1.6.1",
"co": "^4.6.0",
"cross-spawn": "^5.0.1",
"css-loader": "^0.26.1",
"debug": "^2.6.0",
"extract-text-webpack-plugin": "2.0.0-beta.4",