1.0.3 • Published 7 years ago
oenv v1.0.3
oenv
It writes a temporary file to override some environment variables in building time. It creates a oenv.js file as default which contains some values specified by a command line.
Install
$ yarn add -D oenvUsage
"script": {
"env:dev": "oenv -d src STAGE=dev FOO=BAR",
"env:prod": "oenv -d src STAGE=prod FOO=BAR",
}If you run a env:dev command, it will create a oenv.js file like this.
// This file is auto-generated: #timestamp#
process.env.STAGE = "dev";
process.env.FOO = "BAR";Options
-o | --outputSpecifies an output file name. Usesoenv.jsas default.-d | --outputDirSpecifies an output directory. Uses.as default.-v | --verbosePrints all contents inoenv.jsintoconsole.log.