oenv

1.0.3 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i oenv

Weekly Downloads

2

Version

1.0.3

License

ISC

Unpacked Size

11.4 kB

Total Files

4

Last publish

Collaborators

  • jongho.han
  • voyagerx-sysadmin
  • jaehwa.chang
  • lacti