Skip to content

eduarlop/ng-config

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ng-config

Build Status

Generate Angular constants from POJO

Usage

ng-config returns a single function that takes an optional options object and returns a string.

Example:

var fs = require('fs');
var ngConfig = require('ng-config');
var options = {
  constants: {
    hello: 'world'
  }
};

var config = ngConfig(options);

console.log(config);
// =>
// 'use strict';
// angular.module('config', [])
//   .constant('hello', 'world');

fs.writeFileSync('app/config.js', config);

The module name and template are customisable. See the source for the current defaults.

See also

Author

© 2014 Tom Vincent [email protected]

License

Licensed under the MIT license.

About

Generate Angular constants from POJO

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 79.5%
  • Smarty 13.5%
  • Vim Script 7.0%