mlegenhausen/grunt-ng-constant

using the resulting json inside the grunt task

sentient opened this issue · 4 comments

I'm already using it as the configuration in the javascript source file.
I'm interested to use the same configuration result for some other grunt tasks.

E.g. similar as to load grunt.config('my_var');
could I access the ngcontrant.config('my_var') inside the grunt script?

If you want to access the generated constants definition you can simply open the generated file via grunt.file.read(). If you want the configuration object you can use e.g. grunt.config('ngconstant.myTarget.constants').

Nice.

Does it solve your problem ?

Yes it does! I have a different issue. But let me open a different ticket for that