@zaflun/ngx-scripts

Support scripts for angular projects

Usage no npm install needed!

<script type="module">
  import zaflunNgxScripts from 'https://cdn.skypack.dev/@zaflun/ngx-scripts';
</script>

README

:rocket: zaflun/ngx-scripts

NPM version Build Status Node version License

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: During env, 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 to yarn.

License

MIT