Socket
Socket
Sign inDemoInstall

oenv

Package Overview
Dependencies
51
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    oenv

Override environment variables in your build time.


Version published
Weekly downloads
4
Maintainers
1
Install size
613 kB
Created
Weekly downloads
 

Readme

Source

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.

Keywords

FAQs

Last updated on 27 Jun 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc