remove the need to specify debug env when creating test projects

This commit is contained in:
Evan You
2018-01-07 21:45:49 -05:00
parent e8638ef32b
commit 1d25147244
2 changed files with 8 additions and 1 deletions

View File

@@ -16,7 +16,6 @@ cd packages/@vue/cli
yarn link
# create test projects in /packages/test
export VUE_CLI_DEBUG=true # necessary for manual tests to work
cd -
cd packages/test
vue create test-app

View File

@@ -1,5 +1,7 @@
#!/usr/bin/env node
const fs = require('fs')
const path = require('path')
const chalk = require('chalk')
const semver = require('semver')
const { error } = require('@vue/cli-shared-utils')
@@ -13,6 +15,12 @@ if (!semver.satisfies(process.version, requiredVersion)) {
process.exit(1)
}
// enter debug mode when creating test repo
if (process.cwd().indexOf('/packages/test') > 0 &&
fs.existsSync(path.resolve(process.cwd(), '../@vue'))) {
process.env.VUE_CLI_DEBUG = true
}
const program = require('commander')
const loadCommand = require('../lib/util/loadCommand')