phase2 / grunt-drupal-tasks

Grunt-based build and testing tasks for Drupal
https://phase2.github.io/grunt-drupal-tasks/
MIT License
124 stars 50 forks source link

On `watch` only run validate tasks against changed files. #143

Closed grayside closed 9 years ago

grayside commented 9 years ago

This points out how to configure an event that feeds your grunt tasks with the changed files. We'd want to use the "smart" approach. https://github.com/gruntjs/grunt-contrib-watch#compiling-files-as-needed

I've also rolled a quick experiment in creating a validate:newer option. This isn't effective for watch, but referencing as related work.

grayside commented 9 years ago

On second thought, newer might be a decent way to roll as it should be picking up on the same changes watch detected, and with less likelihood of timing issues muddling which files are going to be checked. Like #151, this brings us back to https://github.com/SaschaGalley/grunt-phpcs/issues/23 because grunt-phpcs is currently unfriendly to newer.