tschaub / gulp-newer

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

Destination file suffix support #2

Closed mprencipe closed 10 years ago

mprencipe commented 10 years ago

I added support for specifying suffix for destination files. The use case is languages that compile to JavaScript, e.g. CoffeeScript.

tschaub commented 10 years ago

Nice! Thanks @mprencipe. This is a clearly missing feature to make the plugin useful. What do you think about accepting a config object with dest and ext members instead of two arguments? I just suggested something similar in #1. If there are likely to be other configuration options, I like the idea of a single arg.

It looks like there is a minor JSHint complaint as well.

tschaub commented 10 years ago

We could still accept a single string arg as well. If string, it is the dest path. If object, it must have a string dest value.

mprencipe commented 10 years ago

Sorry I totally missed issue #1. Fixed newer() so that it accepts either a string or an object. I added lodash as a dependency, hope you don't mind.

tschaub commented 10 years ago

Thanks for the contribution @mprencipe!

I like the name "suffix" but I think it conforms better with Node's path.extname and Grunt's ext file configuration property to use the name "ext" for the option. I've done this in #3. Hope that looks ok to you.

mprencipe commented 10 years ago

Look great, thanks!