Do not expand pattern before passing to Gaze. #43

Closed
wants to merge 1 commit into
from
View
@@ -101,14 +101,11 @@ module.exports = function(grunt) {
if (typeof target.files === 'string') {
target.files = [target.files];
}
- // Get patterns to glob for this target
- var patterns = grunt.file.expand(target.files);
@itsjamie
itsjamie Jan 31, 2013 Contributor

This caused an issue because the original glob patterns didn't make it to Gaze, instead we had an array of patterns that matched individual files, therefore, new files would never match.

-
// Default options per target
var options = grunt.util._.defaults(target.options || {}, defaults);
// Create watcher per target
- var gaze = new Gaze(patterns, options, function(err) {
+ var gaze = new Gaze(target.files, options, function(err) {
if (err) {
grunt.log.error(err.message);
return done();