gulp-ng-constant
gulp-ng-constant copied to clipboard
Adding option to group constants under one constant name. See issue #38.
Hi,
I didn't find the possibility to group under one single constant name.
Example
Given an object like:
{
"person": "samir",
"age": 99
}
I wanted to get this:
angular.module("conf", [])
.constant("CONFIG", {
"person": "samir",
"age": 99
});
but instead got this:
angular.module("conf", [])
.constant("person", "samir")
.constant"age", 99);
Using an optional parameter we can simply group the whole object under a user defined constant.
Let me know if you think this feature makes sense and I'll write the tests and update README to include an example (I just added the option explanation for now).
@guzart how about to merge it?