Last active
December 23, 2015 04:39
-
-
Save vilmosioo/6581960 to your computer and use it in GitHub Desktop.
Example usage of ng-constant to create environment variables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grunt.initConfig({ | |
ngconstant: { | |
dev: [ | |
{ | |
dest: 'path/to/constants.js', | |
name: 'Constants', | |
constants: { | |
'<constant name>': grunt.file.readJSON('path/to/dev.json'), | |
} | |
} | |
], | |
prod: [ // same as dev task except the JSON source file is different | |
{ | |
dest: 'path/to/constants.js', | |
name: 'Constants', | |
constants: { | |
'<constant name>': grunt.file.readJSON('path/to/prod.json'), | |
} | |
} | |
], | |
}, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment