Pon task to set NODE_ENV
$ npm install pon-task-env --save
'use strict'
const pon = require('pon')
const env = require('pon-task-env')
async function tryExample () {
let run = pon({
'production:env': env('production'),
'production:debug': env('development', { DEBUG: 'sg:*' }), // Change env variables other than NODE_ENV
'production:compile': () => { /* ... */ }
})
run('production:env', 'production:compile')
}
tryExample()
Define task
Param | type | Description |
---|---|---|
nodeEnv | string | NODE_ENV to set |
otherEnv | Object | Other env vriables |
options | Object | Optional settings |
This software is released under the Apache-2.0 License.