Skip to content

tradity/angular-write-constants

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-write-constants

NPM Version NPM Downloads Build Status Coverage Status Dependency Status devDependency Status

Utility for creating a JS config for angular using constants, using a list of input files.

Install via npm install angular-write-constants.

CLI usage

angular-write-constants --module moduleName primary.json secondary.json ... > config.js

Example contents:

primary.json:

{
  "answerToEverything": 42,
  "overriddenValue": "someOldValue"
}

secondary.json:

{
  "overriddenValue": "someNewValue",
  "apiEndpoint": "https://google.com/"
}

Resulting config.js:

angular.module("moduleName")
  .constant("ANSWER_TO_EVERYTHING", 42)
  .constant("OVERRIDDEN_VALUE", "someNewValue")
  .constant("API_ENDPOINT", "https://google.com/");

License

MIT

About

Create a JS config for angular using constants

Resources

License

Stars

Watchers

Forks

Packages

No packages published