Nuxt/packages/cli/src/options/common.js

42 lines
964 B
JavaScript
Raw Normal View History

import { defaultNuxtConfigFile } from '@nuxt/config'
import { normalizeArg } from '../utils'
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',
default: defaultNuxtConfigFile,
description: `Path to Nuxt.js config file (default: \`${defaultNuxtConfigFile}\`)`
},
modern: {
alias: 'm',
type: 'string',
description: 'Build/Start app for modern browsers, e.g. server, client and false',
prepare(cmd, options, argv) {
2018-11-08 09:18:56 +00:00
if (argv.modern !== undefined) {
options.modern = normalizeArg(argv.modern)
}
}
},
version: {
alias: 'v',
type: 'boolean',
description: 'Display the Nuxt version'
},
help: {
alias: 'h',
type: 'boolean',
description: 'Display this message'
}
}