diff --git a/bin/nuxt b/bin/nuxt index 64c640ab09..18e2a9892c 100755 --- a/bin/nuxt +++ b/bin/nuxt @@ -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); diff --git a/package.json b/package.json index 0839e9d51f..6036bc2a7b 100644 --- a/package.json +++ b/package.json @@ -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",