New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

different-ng-env

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

different-ng-env

A different way to handle Angular environments

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-57.14%
Maintainers
1
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 18 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc