mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-03 19:07:15 +00:00
feat(cli): add internal _generate and _build options (#5434)
This commit is contained in:
parent
583e32a3ef
commit
516aea3d7f
@ -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) {
|
||||||
|
@ -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
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user