This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

different-ng-env

0.0.4 • Public • Published

different-ng-env

Angular environments requires multiple files for each environment you would eventually want to deploy it to and these files are required to be commited to the source control system of choice. This makes it difficult to keep private things like api keys, private paths of hashes in case of widely distributed projects.

On top of that most automation engineers would like to avoid editing directly the typescript files mentioned before and would preffer to just supply environment variable.

Taking advantage of the wide spread usage of dotenv this helper tool will clear away your existing main/production environments file, ignore it for versioning (if using git, sorry SVN users), read only the environment variables you need and create a typescript file to be used by the Angular build script.

Usage

Installation

$ npm i different-ng-env
$ ng-env

Define in .env.example the environment variables you want available to your Angular runtime, for example

ENV = DEV
URL = "localhost:8080"

Commands

The -y flag will look for a .env.example file, if none is found will create an empty one. It will also remove ./src/environments folder from git versioning and add it to .gitignore

$ ng-env -y

Dependencies (5)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i different-ng-env

    Weekly Downloads

    3

    Version

    0.0.4

    License

    MIT

    Unpacked Size

    4.78 kB

    Total Files

    5

    Last publish

    Collaborators

    • alex.alexandrescu