mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-06 21:10:38 +00:00
feat: options.minimalCLI
This commit is contained in:
parent
55dd9e76e2
commit
f2e26b3c04
@ -40,7 +40,7 @@ export default class Builder {
|
||||
this.filesWatcher = null
|
||||
this.customFilesWatcher = null
|
||||
this.spinner = createSpinner({
|
||||
minimal: this.options.test || this.options.ci
|
||||
minimal: this.options.minimalCLI
|
||||
})
|
||||
|
||||
// Mute stats on dev
|
||||
|
@ -21,7 +21,7 @@ export default class Generator {
|
||||
)
|
||||
|
||||
this.spinner = createSpinner({
|
||||
minimal: this.options.test || this.options.ci
|
||||
minimal: this.options.minimalCLI
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ export default function webpackBaseConfig({ name, isServer }) {
|
||||
if (this.options.build.profile) {
|
||||
config.plugins.push(new webpack.ProgressPlugin({ profile: true }))
|
||||
} else {
|
||||
if (!(this.options.test || this.options.ci)) {
|
||||
if (!(this.options.minimalCLI)) {
|
||||
config.plugins.push(new ProgressPlugin({
|
||||
spinner: this.spinner,
|
||||
name: isServer ? 'server' : 'client',
|
||||
|
@ -4,9 +4,10 @@ import isCI from 'is-ci'
|
||||
export default {
|
||||
// Information about running environment
|
||||
dev: process.env.NODE_ENV !== 'production',
|
||||
debug: undefined, // Will be equal to dev if not provided
|
||||
debug: undefined, // = dev
|
||||
test: process.env.NODE_ENV === 'test',
|
||||
ci: Boolean(isCI),
|
||||
minimalCLI: undefined, // = ci || test || !dev
|
||||
|
||||
// Mode
|
||||
mode: 'universal',
|
||||
|
@ -121,6 +121,16 @@ Options.from = function (_options) {
|
||||
)
|
||||
}
|
||||
|
||||
// Debug errors
|
||||
if (options.debug === undefined) {
|
||||
options.debug = options.dev
|
||||
}
|
||||
|
||||
// minimalCLI
|
||||
if (options.minimalCLI === undefined) {
|
||||
options.minimalCLI = options.ci || options.test || !options.dev
|
||||
}
|
||||
|
||||
// Apply default hash to CSP option
|
||||
if (options.render.csp === true) {
|
||||
options.render.csp = { hashAlgorithm: 'sha256' }
|
||||
@ -136,11 +146,6 @@ Options.from = function (_options) {
|
||||
options.build.babel.cacheDirectory = options.dev
|
||||
}
|
||||
|
||||
// Debug errors
|
||||
if (options.debug === undefined) {
|
||||
options.debug = options.dev
|
||||
}
|
||||
|
||||
// Resource hints
|
||||
if (options.render.resourceHints === undefined) {
|
||||
options.render.resourceHints = !options.dev
|
||||
|
Loading…
Reference in New Issue
Block a user