Skip to content

Commit

Permalink
fix: avoid util.promisify when resolving webpack.config.js
Browse files Browse the repository at this point in the history
The file may be required by an IDE which uses an older version of Node.

close #1473
  • Loading branch information
yyx990803 committed Jun 5, 2018
1 parent 98b6d26 commit 89a0e65
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion packages/@vue/cli-shared-utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@

exports.chalk = require('chalk')
exports.execa = require('execa')
exports.cmdShim = require('util').promisify(require('cmd-shim'))
1 change: 0 additions & 1 deletion packages/@vue/cli-shared-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"homepage": "https://github.com/vuejs/vue-cli/packages/@vue/cli-shared-utils#readme",
"dependencies": {
"chalk": "^2.3.0",
"cmd-shim": "^2.0.2",
"execa": "^0.10.0",
"joi": "^12.0.0",
"node-ipc": "^9.1.1",
Expand Down
3 changes: 1 addition & 2 deletions packages/@vue/cli/lib/Creator.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const { clearConsole } = require('./util/clearConsole')
const PromptModuleAPI = require('./PromptModuleAPI')
const writeFileTree = require('./util/writeFileTree')
const { formatFeatures } = require('./util/features')
const setupDevProject = require('./util/setupDevProject')
const fetchRemotePreset = require('./util/fetchRemotePreset')

const {
Expand Down Expand Up @@ -134,7 +133,7 @@ module.exports = class Creator extends EventEmitter {
this.emit('creation', { event: 'plugins-install' })
if (isTestOrDebug) {
// in development, avoid installation process
await setupDevProject(context)
await require('./util/setupDevProject')(context)
} else {
await installDeps(context, packageManager, cliOptions.registry)
}
Expand Down
3 changes: 2 additions & 1 deletion packages/@vue/cli/lib/util/linkBin.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// cross-platform executable link, mostly for Windows
// this file is dev-only.

const fs = require('fs-extra')
const path = require('path')
const { cmdShim } = require('@vue/cli-shared-utils')
const cmdShim = require('util').promisify(require('cmd-shim'))

exports.linkBin = async (src, dest) => {
if (!process.env.VUE_CLI_TEST && !process.env.VUE_CLI_DEBUG) {
Expand Down
1 change: 1 addition & 0 deletions packages/@vue/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@vue/cli-ui": "^3.0.0-beta.15",
"@vue/cli-ui-addon-webpack": "^3.0.0-beta.15",
"chalk": "^2.3.0",
"cmd-shim": "^2.0.2",
"commander": "^2.12.2",
"debug": "^3.1.0",
"deepmerge": "^2.0.1",
Expand Down

0 comments on commit 89a0e65

Please sign in to comment.