Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default () => ({
// Env
dev: Boolean(env.dev),
test: Boolean(env.test),
debug: undefined, // = dev
env: {},
// Mode
mode: 'universal',
modern: undefined,
// Globals
globalName: `nuxt`,
globals: {
id: globalName => `__${globalName}`,
nuxt: globalName => `$${globalName}`,
context: globalName => `__${globalName.toUpperCase()}__`,
pluginPrefix: globalName => globalName,
readyCallback: globalName => `on${capitalize(globalName)}Ready`,
loadedCallback: globalName => `_on${capitalize(globalName)}Loaded`
export function showBanner (nuxt, showMemoryUsage = true) {
if (env.test) {
return
}
if (env.minimalCLI) {
for (const listener of nuxt.server.listeners) {
consola.info('Listening on: ' + listener.url)
}
return
}
const titleLines = []
const messageLines = []
// Name and version
const { bannerColor } = nuxt.options.cli
titleLines.push(`${chalk[bannerColor].bold('Nuxt.js')} ${nuxt.constructor.version}`)