1.0.0 • Published 9 years ago

ng-config v1.0.0

Weekly downloads
32
License
MIT
Repository
github
Last release
9 years ago

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 the current defaults.

See also

Author

© 2014 Tom Vincent git@tlvince.com

License

Licensed under the MIT license.