🚀 zaflun/ngx-scripts
Installation
npm install --save @zaflun/ngx-scripts
yarn add @zaflun/ngx-scripts
Usage
This modules provides CLI commands to be used in NPM scripts.
Export environment variables to a JSON or JavaScript file
ngx-scripts env <env_var> [<env_var2> ...] [--out <file>] [--format json|js] [--parse-json]
Default output file is src/environments/.env.ts
with JavaScript format.
Options
-
--parse-json
: Duringenv
, if an environment variable's value is parsable JSON, it will be a proper object in.env.ts
Note: Yarn is automatically used instead of NPM is the environment variable
NGX_PACKAGE_MANAGER
is set toyarn
.