Skip to content

narcello/changenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💫 changenv

Change environment vars after build

NPM Version NPM Downloads

🎯 Motivation: Dead Components

Sometimes in project, with so specific architecture on build the env vars aren't change.

💻 Tech

Just bash :)

📥 Install

  • Npm
npm i -g changenv
  • Yarn
yarn add changenv

🔨 Usage

changenv <environment> <path_to_folder>

Changenv will looking for .env.<environment> file, read it, and for each var, change every match with process.env.<env_var_name> on <path_to_folder> with their value.

⚡ Examples

changenv production ./build
changenv staging ./lib
changenv development ./dist