Skip to content

Commit

Permalink
Resolve #26 and #18.
Browse files Browse the repository at this point in the history
Add grunt-newer plugin to address speed issues with the grunt-watch task. The watch task now only compiles the file that has been changed since the task was last run. Simple!
  • Loading branch information
willmcl committed Jan 22, 2015
1 parent f09008a commit e098262
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Version Log
* Adde default code in .htaccess to allow cross domain font requests in all browsers
* Exclude Modernizer from the bower_concat task and add it to the uglify task and include in header.php
* Remove old SITE_ROOT variable from functions.php
* Added grunt-newer plugin to help with grunt-watch speed issues

*v0.10.0*
* Introduce the grunt-load-config plugin as a way to split our grunt tasks into separate files and make Bread and Butter more maintainable.
Expand Down
12 changes: 6 additions & 6 deletions grunt/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@ module.exports = {
// You should adapt this to your specific needs on a per project basis
pages: {
files: ['<%= src %>/pages/*.php'],
tasks: ['copy:pages'],
tasks: ['newer:copy:pages'],
},
modules: {
files: ['<%= src %>/modules/*.php'],
tasks: ['copy:modules'],
tasks: ['newer:copy:modules'],
},
includes: {
files: ['<%= src %>/includes/*.php'],
tasks: ['copy:includes'],
tasks: ['newer:copy:includes'],
},
images: {
files: ['<%= src %>/images/*'],
tasks: ['copy:images'],
tasks: ['newer:copy:images'],
},
scripts: {
files: ['<%= src %>/js/*.js'],
tasks: ['jshint'],
tasks: ['newer:jshint'],
},
uglify: {
files: ['<%= src %>/js/*.js'],
tasks: ['uglify'],
tasks: ['newer:uglify'],
},
css: {
files: ['<%= src %>/**/*.less'],
Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
"version": "0.9.0",
"devDependencies": {
"grunt": "^0.4.4",
"grunt-contrib-watch": "^0.6.1",
"grunt-contrib-less": "^0.11.0",
"grunt-contrib-uglify": "^0.4.0",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-copy": "^0.5.0",
"grunt-autoprefixer": "^0.7.2",
"grunt-contrib-cssmin": "^0.9.0",
"grunt-contrib-clean": "^0.6.0",
"grunt-bower-concat": "^0.3.0",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-copy": "^0.5.0",
"grunt-contrib-cssmin": "^0.9.0",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-less": "^0.11.0",
"grunt-contrib-uglify": "^0.4.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-newer": "^1.1.0",
"grunt-pixrem": "^0.1.2",
"load-grunt-config": "^0.16.0"
}
Expand Down

0 comments on commit e098262

Please sign in to comment.