feat(cli): add internal _generate and _build options (#5434)

This commit is contained in:
Pooya Parsa 2019-04-01 20:18:24 +04:30 committed by GitHub
parent 583e32a3ef
commit 516aea3d7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -61,7 +61,7 @@ export default {
} }
}, },
async run(cmd) { async run(cmd) {
const config = await cmd.getNuxtConfig({ dev: false }) const config = await cmd.getNuxtConfig({ dev: false, _build: true })
const nuxt = await cmd.getNuxt(config) const nuxt = await cmd.getNuxt(config)
if (cmd.argv.lock) { if (cmd.argv.lock) {

View File

@ -35,7 +35,7 @@ export default {
}, },
async _startDev(cmd, argv) { async _startDev(cmd, argv) {
const config = await cmd.getNuxtConfig({ dev: true }) const config = await cmd.getNuxtConfig({ dev: true, _build: true })
const nuxt = await cmd.getNuxt(config) const nuxt = await cmd.getNuxt(config)
// Setup hooks // Setup hooks

View File

@ -53,7 +53,7 @@ export default {
} }
}, },
async run(cmd) { async run(cmd) {
const config = await cmd.getNuxtConfig({ dev: false }) const config = await cmd.getNuxtConfig({ dev: false, _generate: true, _build: cmd.argv.build })
// Disable analyze if set by the nuxt config // Disable analyze if set by the nuxt config
if (!config.build) { if (!config.build) {