fix: typo in cli/commands/build (#4236)

Good catch @clarkdo :)
This commit is contained in:
Jonas Galvez 2018-10-31 12:27:15 -03:00 committed by Clark Du
parent 08d298d35c
commit c86dfbf43f

View File

@ -28,7 +28,7 @@ export default {
alias: 'q',
type: 'boolean',
description: 'Disable output except for errors',
handle(options, argv) {
prepare(cmd, options, argv) {
// Silence output when using --quiet
options.build = options.build || {}
if (argv.quiet) {
@ -37,12 +37,12 @@ export default {
}
}
},
async run(nuxtCmd) {
const argv = nuxtCmd.getArgv()
async run(cmd) {
const argv = cmd.getArgv()
// Create production build when calling `nuxt build` (dev: false)
const nuxt = await nuxtCmd.getNuxt(
await nuxtCmd.getNuxtConfig(argv, { dev: false })
const nuxt = await cmd.getNuxt(
await cmd.getNuxtConfig(argv, { dev: false })
)
// Setup hooks
@ -51,10 +51,10 @@ export default {
let builderOrGenerator
if (nuxt.options.mode !== 'spa' || argv.generate === false) {
// Build only
builderOrGenerator = (await nuxtCmd.getBuilder(nuxt)).build()
builderOrGenerator = (await cmd.getBuilder(nuxt)).build()
} else {
// Build + Generate for static deployment
builderOrGenerator = (await nuxtCmd.getGenerator(nuxt)).generate({
builderOrGenerator = (await cmd.getGenerator(nuxt)).generate({
build: true
})
}