Skip to content

Commit

Permalink
Added --no-server-watch option to grunt-dev (#9719)
Browse files Browse the repository at this point in the history
refs #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
  • Loading branch information
kevinansfield authored Jul 9, 2018
1 parent 46fdf3b commit 3ec6249
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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
}
}
Expand Down

0 comments on commit 3ec6249

Please sign in to comment.