fix(cli): apply default value for NODE_ENV environment variable (#4003)

This commit is contained in:
Pooya Parsa 2018-09-28 19:53:25 +03:30 committed by Sébastien Chopin
parent d7fa66ddde
commit 0c1d94a2c7
4 changed files with 8 additions and 0 deletions

View File

@ -1,4 +1,6 @@
#!/usr/bin/env node
process.env.NODE_ENV = process.env.NODE_ENV || 'production'
const parseArgs = require('minimist')
const consola = require('consola')
const { Nuxt, Builder, Generator } = require('..')

View File

@ -1,4 +1,6 @@
#!/usr/bin/env node
process.env.NODE_ENV = process.env.NODE_ENV || 'development'
const parseArgs = require('minimist')
const consola = require('consola')
const { version } = require('../package.json')

View File

@ -1,4 +1,6 @@
#!/usr/bin/env node
process.env.NODE_ENV = process.env.NODE_ENV || 'production'
const parseArgs = require('minimist')
const consola = require('consola')
const { Nuxt, Builder, Generator } = require('..')

View File

@ -1,4 +1,6 @@
#!/usr/bin/env node
process.env.NODE_ENV = process.env.NODE_ENV || 'production'
const fs = require('fs')
const { resolve } = require('path')
const parseArgs = require('minimist')