got grunt-env to work with .env file

This commit is contained in:
David Baldwynn 2017-10-10 22:25:39 -07:00
parent d1039c7fc2
commit 60abe5a227
2 changed files with 2 additions and 7 deletions

View File

@ -161,6 +161,8 @@ module.exports = function(grunt) {
}
},
env: {
src: '.env',
test: {
NODE_ENV: 'test',
},

View File

@ -3,13 +3,6 @@
* Module dependencies.
*/
//Load ENV vars from .env
var old_NODE_ENV = process.env.NODE_ENV;
require('dotenv').config();
if(!old_NODE_ENV){
process.env.NODE_ENV = old_NODE_ENV;
}
require('events').EventEmitter.prototype._maxListeners = 0;