1.0.5 • Published 5 months ago
gen-envs v1.0.5
🚀 gen-envs
A simple Node.js CLI tool that generates an environment/
folder with separate environment files (dev
, staging
, uat
, prod
). It supports both .js
and .ts
extensions.
📌 Installation
Since this is a CLI tool, use npx
to run it without installation:
npx gen-envs
This command Generate .js Environment Files by default.
Example
These files generated by executing the above command.
/environment/env.dev.js /environment/env.staging.js /environment/env.uat.js /environment/env.prod.js
Parameter | Arguments (Optional)
if you want to generate the env files having .ts extension, execute below command:
npx gen-envs --ext=ts
this creates :
/environment/env.dev.ts /environment/env.staging.ts /environment/env.uat.ts /environment/env.prod.ts
Example Environment Files
For JavaScript (.js):
module.exports = { env: "dev" };
For TypeScript (.ts):
export const environment = { env: "dev" };