tschaub / gulp-newer

Pass through newer source files only
https://npmjs.org/package/gulp-newer
226 stars 24 forks source link

1:many #28

Open strarsis opened 8 years ago

strarsis commented 8 years ago

There is also the case (like gulp-favicons) that a plugin takes one file and outputs multiple file (1:many). I also got an array with output filenames. How can I use it with gulp-newer?

TimMensch commented 8 years ago

If one file always generates all of the outputs every time you run the task, then you can just pick the first output and use a degenerate many:1 mapping: You'd be telling it one input file and one output file. Since all the output files are changed at the same time, it doesn't matter which one you pick.

If your tool only updates modified files, then this won't work, but in that case you really don't need gulp-newer.