Created
February 24, 2015 10:19
-
-
Save alvaromb/579fd458b482f1ffb0fc to your computer and use it in GitHub Desktop.
Grunt environment settings for AngularJS
This file contains 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
/*global grunt*/ | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
ngconstant: { | |
options: { | |
name: 'environment', | |
dest: 'www/js/environment.js', | |
wrap: "'use strict';\n\n{%= __ngModule %}" | |
}, | |
dev: { | |
constants: { | |
ENV: 'dev' | |
} | |
}, | |
pre: { | |
constants: { | |
ENV: 'pre' | |
} | |
}, | |
prod: { | |
constants: { | |
ENV: 'prod' | |
} | |
} | |
}, | |
}); | |
grunt.loadNpmTasks('grunt-ng-constant'); | |
grunt.registerTask('dev', [ | |
'ngconstant:dev' | |
]); | |
grunt.registerTask('pre', [ | |
'ngconstant:pre' | |
]); | |
grunt.registerTask('prod', [ | |
'ngconstant:prod' | |
]); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment