From 7cffc84422a1821a04aa18e5e221e729750ed33f Mon Sep 17 00:00:00 2001 From: David Baldwynn Date: Fri, 6 Nov 2015 12:21:52 -0800 Subject: [PATCH] fixed glob.sync in init.js --- config/init.js | 22 ++++++++++------------ package.json | 16 +++++++--------- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/config/init.js b/config/init.js index 3a5b1e52..893989fe 100755 --- a/config/init.js +++ b/config/init.js @@ -14,18 +14,16 @@ module.exports = function() { * Before we begin, lets set the environment variable * We'll Look for a valid NODE_ENV variable and if one cannot be found load the development NODE_ENV */ - glob('./config/env/' + process.env.NODE_ENV + '.js', { - sync: true - }, function(err, environmentFiles) { - if (!environmentFiles.length) { - if (process.env.NODE_ENV) { - console.error(chalk.red('No configuration file found for "' + process.env.NODE_ENV + '" environment using development instead')); - } else { - console.error(chalk.red('NODE_ENV is not defined! Using default development environment')); - } - - process.env.NODE_ENV = 'development'; + var environmentFiles = glob.sync('./config/env/' + process.env.NODE_ENV + '.js'); + if (!environmentFiles.length) { + if (process.env.NODE_ENV) { + console.error(chalk.red('No configuration file found for "' + process.env.NODE_ENV + '" environment using development instead')); + } else { + console.error(chalk.red('NODE_ENV is not defined! Using default development environment')); } - }); + + process.env.NODE_ENV = 'development'; + } + }; diff --git a/package.json b/package.json index 633eeb50..ccddb36a 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "url": "https://github.com/whitef0x0/NodeForms.git" }, "engines": { - "node": "~0.12.6", + "node": "~5.0.0", "npm": "~2.11.2" }, "scripts": { @@ -25,6 +25,7 @@ "async": "^1.4.2", "body-parser": "~1.14.1", "bower": "~1.6.5", + "brace-expansion": "^1.1.1", "chalk": "~1.1.1", "compression": "~1.6.0", "connect-flash": "~0.1.1", @@ -54,16 +55,15 @@ "grunt-nodemon": "~0.4.0", "helmet": "~0.14.0", "load-grunt-tasks": "~3.3.0", - "lodash": "~3.10.1", - "mailosaur": "^1.0.1", + "lodash": "^2.4.1", "main-bower-files": "~2.9.0", "math": "0.0.3", "method-override": "~2.3.0", "mocha": ">=1.20.0", "mongoose": "~3.8.8", + "mongoose-utilities": "~0.1.1", "morgan": "~1.6.1", - "multer": "~0.1.8", - "pdffiller": "~0.1.1", + "multer": "^0.1.8", "nodemailer": "~1.8.0", "nools": "^0.4.1", "passport": "~0.3.0", @@ -73,16 +73,14 @@ "passport-linkedin": "~1.0.0", "passport-local": "~1.0.0", "passport-twitter": "~1.0.2", + "pdffiller": "~0.1.1", + "pkg-up": "^1.0.0", "raven": "^0.8.1", "request": "^2.60.0", "request-promise": "^1.0.2", "satelize": "~0.1.1", "shortid": "^2.2.2", - "should": "~4.1.0", "soap": "^0.11.0", - "supertest": "~0.14.0", - "mongoose-utilities": "~0.1.1", - "supertest-session": "^1.0.0", "swig": "~1.4.1", "then-fs": "~2.0.0" },