javascript - Gruntjs read from external json file -


i attempting read in external json file , use in custom task:

inside initconfig

grunt.initconfig({   env: grunt.file.readjson("path"),   ...   ..   . });  // registering task grunt.registertask('namehere', 'descriptionhere', function () {    // how @ "env"     "<%= env.environment %>" // doesnt work gives me string literal "<%= environmentvars.environment %>" }); 

you're use grunt.config.get("env") or grunt.config("env") purpose.

more info: http://gruntjs.com/api/grunt.config#grunt.config.get (thanks @mike fielden)


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -