2019-01-22 19:52:43 +00:00
|
|
|
import { defaultNuxtConfigFile } from '@nuxt/config'
|
2018-11-22 15:48:26 +00:00
|
|
|
import { normalizeArg } from '../utils'
|
|
|
|
|
2018-10-29 22:16:16 +00:00
|
|
|
export default {
|
|
|
|
spa: {
|
|
|
|
alias: 's',
|
|
|
|
type: 'boolean',
|
|
|
|
description: 'Launch in SPA mode'
|
|
|
|
},
|
|
|
|
universal: {
|
|
|
|
alias: 'u',
|
|
|
|
type: 'boolean',
|
|
|
|
description: 'Launch in Universal mode (default)'
|
|
|
|
},
|
|
|
|
'config-file': {
|
|
|
|
alias: 'c',
|
|
|
|
type: 'string',
|
2019-01-22 19:52:43 +00:00
|
|
|
default: defaultNuxtConfigFile,
|
2020-11-30 22:44:04 +00:00
|
|
|
description: `Path to Nuxt config file (default: \`${defaultNuxtConfigFile}\`)`
|
2018-10-29 22:16:16 +00:00
|
|
|
},
|
2018-11-07 23:37:06 +00:00
|
|
|
modern: {
|
|
|
|
alias: 'm',
|
|
|
|
type: 'string',
|
|
|
|
description: 'Build/Start app for modern browsers, e.g. server, client and false',
|
2019-07-10 10:45:49 +00:00
|
|
|
prepare (cmd, options, argv) {
|
2018-11-08 09:18:56 +00:00
|
|
|
if (argv.modern !== undefined) {
|
2018-11-22 15:48:26 +00:00
|
|
|
options.modern = normalizeArg(argv.modern)
|
2018-11-07 23:37:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2020-05-07 19:08:01 +00:00
|
|
|
target: {
|
|
|
|
alias: 't',
|
|
|
|
type: 'string',
|
|
|
|
description: 'Build/start app for a different target, e.g. server, serverless and static',
|
|
|
|
prepare (cmd, options, argv) {
|
|
|
|
if (argv.target) {
|
|
|
|
options.target = argv.target
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2019-02-06 19:23:42 +00:00
|
|
|
'force-exit': {
|
|
|
|
type: 'boolean',
|
2019-07-10 10:45:49 +00:00
|
|
|
default (cmd) {
|
2020-05-07 19:08:01 +00:00
|
|
|
return ['build', 'generate', 'export'].includes(cmd.name)
|
2019-02-08 10:06:47 +00:00
|
|
|
},
|
2020-11-30 22:44:04 +00:00
|
|
|
description: 'Whether Nuxt should force exit after the command has finished'
|
2019-02-06 19:23:42 +00:00
|
|
|
},
|
2018-10-29 22:16:16 +00:00
|
|
|
version: {
|
2018-12-20 11:15:48 +00:00
|
|
|
alias: 'v',
|
2018-10-29 22:16:16 +00:00
|
|
|
type: 'boolean',
|
|
|
|
description: 'Display the Nuxt version'
|
|
|
|
},
|
|
|
|
help: {
|
|
|
|
alias: 'h',
|
|
|
|
type: 'boolean',
|
|
|
|
description: 'Display this message'
|
2020-05-18 08:21:15 +00:00
|
|
|
},
|
|
|
|
processenv: {
|
|
|
|
type: 'boolean',
|
|
|
|
default: true,
|
|
|
|
description: 'Disable reading from `process.env` and updating it with dotenv'
|
|
|
|
},
|
|
|
|
dotenv: {
|
|
|
|
type: 'string',
|
|
|
|
default: '.env',
|
|
|
|
description: 'Specify path to dotenv file (default: `.env`). Use `false` to disable'
|
2018-10-29 22:16:16 +00:00
|
|
|
}
|
|
|
|
}
|