hparra / gulp-rename

Rename files easily
MIT License
692 stars 73 forks source link

Move rename logic to separate module #73

Closed strarsis closed 6 years ago

strarsis commented 7 years ago

It would be nice to have the logic for changing a file name based on a passed option object separated from the gulp plugin using it.

Edit: There are modules like rename but not used by this gulp plugin.

yocontra commented 7 years ago

What API are you proposing? Does it really make sense to use a module to replace 3 lines of code?

strarsis commented 7 years ago

The reason is that other gulp plugins also offer rename functionality, e.g. gulp-responsive which uses rename. But also for a gulp plugin that checks for changed source files, it would be helpful as it also has to apply the filename transformations (for checking the target files).

yocontra commented 6 years ago

We support a custom function being passed in so you can do whatever you want in there, I don't think we need to make our API surface any more complex than that.