Skip to content

Commit

Permalink
fix: ensure vue init works when installed with npm
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Feb 2, 2018
1 parent fa25cc0 commit 6ce8565
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/@vue/cli-init/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
require('vue-cli/bin/vue-init')
const execa = require('execa')
const binPath = require.resolve('vue-cli/bin/vue-init')

execa(
binPath,
process.argv.slice(process.argv.indexOf('init') + 1),
{ stdio: 'inherit' }
)
1 change: 1 addition & 0 deletions packages/@vue/cli-init/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
},
"homepage": "https://github.com/vuejs/vue-cli/packages/@vue/cli-init#readme",
"dependencies": {
"execa": "^0.9.0",
"vue-cli": "^2.9.2"
}
}

0 comments on commit 6ce8565

Please sign in to comment.