From 49191c9023eb4df61fdf3030f62e47cb7467af6d Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Tue, 11 Oct 2016 13:06:07 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20improve=20`gulp=20dev`=20reload?= =?UTF-8?q?=20behaviour=20(#7543)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit refs #7427 - prevent unnecessary reloads of the server due to changes in client files, this makes working on the client as quick/painless as the old `grunt dev` command - fix nodemon `watch` config - it only accepts directories not files - update nodemon `ignore` config - directories should be specified without a `/*`, add directories that are changed on each client re-compile --- gulpfile.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 07c51f17bc..f0faad5956 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -87,13 +87,13 @@ nodemonServerInit = function () { script: 'index.js', ext: 'js,json,hbs', watch: [ - 'core/index.js', - paramConfig.ghost.path + '/', - 'core/built/assets/*.js' + 'core/' ], ignore: [ - 'core/client/*', - 'core/server/test/*' + 'core/client/', + 'core/server/test/', + 'core/server/views/', + 'core/built/' ] }).on('restart', function () { gulp.src(paramConfig.ghost.path + '/') @@ -327,7 +327,7 @@ gulp.task('server', 'Run Ghost server in development with livereload but without // Run `gulp dev` to enter development mode // Filechanges in client will force a livereload // Call it with `--deps` or `-d` to install dependencies as well` -gulp.task('dev', 'Runs Ghost server in delelopment including client build and livereload for both', function (cb) { +gulp.task('dev', 'Runs Ghost server in development with livereload and client rebuild on file changes', function (cb) { console.info(chalk.cyan('Development mode for Ghost will start right meow 👻 ...')); if (argv.deps || argv.d) { runSequence(