From a2a0789492a11f8ca77774019d40a0694322f255 Mon Sep 17 00:00:00 2001 From: Mike McNeil Date: Thu, 25 Jan 2018 00:04:53 -0600 Subject: [PATCH] Tolerate sails-hook-grunt specified in devDependencies when running sails www --- bin/sails-www.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/sails-www.js b/bin/sails-www.js index 65d52a27c..342a89fbc 100644 --- a/bin/sails-www.js +++ b/bin/sails-www.js @@ -48,9 +48,9 @@ module.exports = function() { throw flaverr('E_NO_SAILS_DEP', new Error('This package.json file does not declare `sails` as a dependency.\nAre you sure you\'re in the root directory of a Sails app?')); } - var shGruntDepSVR = packageJson.dependencies['sails-hook-grunt']; + var shGruntDepSVR = packageJson.dependencies['sails-hook-grunt'] || packageJson.devDependencies['sails-hook-grunt']; if (!shGruntDepSVR) { - throw flaverr('E_NO_SH_GRUNT_DEP', new Error('This app\'s package.json file does not declare `sails-hook-grunt` as a dependency.\nAre you sure this is a Sails v1.0 app that is using Grunt?')); + throw flaverr('E_NO_SH_GRUNT_DEP', new Error('This app\'s package.json file does not declare `sails-hook-grunt` in "dependencies" or "devDependencies".\nAre you sure this is a Sails v1.0 app that is using Grunt?')); } } catch (e) {