1.0.3 • Published 6 years ago

oenv v1.0.3

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

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 oenv

Usage

"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 | --output Specifies an output file name. Uses oenv.js as default.
  • -d | --outputDir Specifies an output directory. Uses . as default.
  • -v | --verbose Prints all contents in oenv.js into console.log.
1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago