Skip to content

Instantly share code, notes, and snippets.

@tlvince
Created June 14, 2014 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tlvince/da678d4ca615328962ce to your computer and use it in GitHub Desktop.
Save tlvince/da678d4ca615328962ce to your computer and use it in GitHub Desktop.
grunt-ng-constant with single quotes
angular.module('{%- moduleName %}'{% if (deps) { %}, {%= JSON.stringify(deps) %}{% } %})
{% constants.forEach(function (constant) { %}
.constant('{%- constant.name %}', {%= constant.value %})
{% }); values.forEach(function (value) { %}
.value('{%- value.name %}', {%= value.value %})
{% }) %};
ngconstant: {
options: {
name: 'config',
dest: '<%= yeoman.app %>/scripts/config.js',
template: grunt.file.read('constant.tpl.ejs'),
serializer: function(obj) {
return require('util').inspect(obj);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment