From 09122d5f1efb59c342861ecb94bfb02074587ed8 Mon Sep 17 00:00:00 2001 From: Joe Lanman Date: Tue, 18 Oct 2016 14:36:53 +0100 Subject: [PATCH] make start.js start everything, update nodemon task --- gulp/nodemon.js | 5 +++-- package.json | 2 +- start.js | 7 +++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gulp/nodemon.js b/gulp/nodemon.js index f14284fd20..fe4188f61b 100644 --- a/gulp/nodemon.js +++ b/gulp/nodemon.js @@ -12,7 +12,8 @@ gulp.task('server', function () { nodemon({ script: 'server.js', ext: 'js, json', - ignore: [config.paths.public + '*', config.paths.nodeModules + '*'], - env: {NODE_ENV: 'development'} + ignore: [config.paths.public + '*', + config.paths.assets + '*', + config.paths.nodeModules + '*'] }) }) diff --git a/package.json b/package.json index ecae58b49f..145e56017d 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "node": ">=4.0 <6.7" }, "scripts": { - "start": "node start.js && gulp", + "start": "node start.js", "lint": "standard", "test": "npm run lint" }, diff --git a/start.js b/start.js index ea093d5168..95051e6487 100644 --- a/start.js +++ b/start.js @@ -1,4 +1,5 @@ var path = require('path') +var gulp = require('gulp') // Check for `node_modules` folder and warn if missing var fs = require('fs') @@ -12,6 +13,12 @@ try { fs.unlinkSync(path.join(__dirname, '/.port.tmp')) } catch (e) {} +// gulp +var requireDir = require('require-dir') +requireDir('./gulp', {recurse: true}) + +gulp.start('default') + process.on('SIGINT', function () { // remove .port.tmp if it exists try {