srackham/drake

Request: outOfDate function should accept glob patterns

Closed this issue · 2 comments

Request: outOfDate function should accept glob patterns

This makes sense, although you can currently get the same functionality using the glob API e.g. outOfDate("foobar.js", glob("lib/**/*.ts", "**/*.ts))

Will probably leave it until after the 1.0 release.

The outOfDate API now throws an error if any prerequisite paths do not exist. If prereqs
were globbed internally then missing prerequisites would not be detected. We could confine globbing to globbed paths only and check only non-globbed paths, but this adds cognative
complexity for a feature that only saves 4 characters e.g.

outOfDate("foobar.js", ["lib/**/*.ts", "**/*.ts"]);
outOfDate("foobar.js", glob("lib/**/*.ts", "**/*.ts"));