mirror of https://github.com/TryGhost/Ghost.git
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:
parent
46fdf3b4c4
commit
3ec62499f5
|
@ -65,7 +65,7 @@ var config = require('./core/server/config'),
|
||||||
// ### grunt-contrib-watch
|
// ### grunt-contrib-watch
|
||||||
// Watch files and livereload in the browser during development.
|
// Watch files and livereload in the browser during development.
|
||||||
// See the [grunt dev](#live%20reload) task for how this is used.
|
// See the [grunt dev](#live%20reload) task for how this is used.
|
||||||
watch: {
|
watch: grunt.option('no-server-watch') ? {files: []} : {
|
||||||
livereload: {
|
livereload: {
|
||||||
files: [
|
files: [
|
||||||
'content/themes/casper/assets/css/*.css',
|
'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'],
|
files: ['core/ghost-server.js', 'core/server/**/*.js', 'config.*.json', '!config.testing.json'],
|
||||||
tasks: ['express:dev'],
|
tasks: ['express:dev'],
|
||||||
options: {
|
options: {
|
||||||
nospawn: true,
|
spawn: false,
|
||||||
livereload: true
|
livereload: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue