Added `--no-server-watch` option to `grunt-dev` (#9719)

refs https://github.com/TryGhost/Ghost/issues/9718
- running `grunt dev --no-server-watch` will skip watching server and theme files
- reduces idle CPU usage from 20% to 0%
- useful for client-only development to save battery power
This commit is contained in:
Kevin Ansfield 2018-07-09 10:12:33 +01:00 committed by GitHub
parent 46fdf3b4c4
commit 3ec62499f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ var config = require('./core/server/config'),
// ### grunt-contrib-watch
// Watch files and livereload in the browser during development.
// See the [grunt dev](#live%20reload) task for how this is used.
watch: {
watch: grunt.option('no-server-watch') ? {files: []} : {
livereload: {
files: [
'content/themes/casper/assets/css/*.css',
@ -79,7 +79,7 @@ var config = require('./core/server/config'),
files: ['core/ghost-server.js', 'core/server/**/*.js', 'config.*.json', '!config.testing.json'],
tasks: ['express:dev'],
options: {
nospawn: true,
spawn: false,
livereload: true
}
}