Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

envup

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

envup

Command line tool to configure dotenv files

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
28
decreased by-54.1%
Maintainers
1
Weekly downloads
 
Created
Source

envup

Getting started

Install the tool from npm

$ npm i -g envup

Define the variables your application needs in an env.json in the root of the directory:

[
  { "name": "PORT", "defaultOption": "8080" },
  { "name": "HOST", "defaultOption": "127.0.0.1" }
]

Run the command in the project root:

$ envup

For more advanced use cases specify an env.js that exports a function returning the env keypairs:

const googleFont = function(font) {
  return `'https://fonts.googleapis.com/css?family=${font}:400,700'`;
};
module.exports = function(inquirer, currentEnv) {
  return inquirer
    .prompt([
      {
        type: "list",
        name: "REACT_APP_FONT",
        message: "Which theme do you want",
        default: currentEnv.REACT_APP_FONT || "Roboto",
        choices: ["Roboto", "Lato", "Montserrat"]
      }
    ])
    .then(function(options) {
      return {
        REACT_APP_FONT: options.REACT_APP_FONT,
        REACT_APP_GOOGLE_FONT_URI: googleFont(options.REACT_APP_FONT)
      };
    });
};

Keywords

FAQs

Package last updated on 16 Nov 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc