Set NODE_ENV in grunt dev task to serve non-minified assets

This commit is contained in:
Nick O'Leary
2015-05-11 20:24:15 +01:00
parent f11b906fd9
commit 0bef04ae0a
3 changed files with 12 additions and 2 deletions

View File

@@ -340,6 +340,13 @@ module.exports = function(grunt) {
}
}
});
grunt.registerTask('setDevEnv',
'Sets NODE_ENV=development to non-minified assets are used',
function () {
process.env.NODE_ENV = 'development';
});
grunt.registerTask('default',
'Builds editor content then runs code style checks and unit tests on all components',
@@ -363,7 +370,7 @@ module.exports = function(grunt) {
grunt.registerTask('dev',
'Developer mode: run node-red, watch for source changes and build/restart',
['build','concurrent:dev']);
['build','setDevEnv','concurrent:dev']);
grunt.registerTask('release',
'Create distribution zip file',