hparra / gulp-rename

Rename files easily
MIT License
692 stars 73 forks source link

Use returned object in 'function' mode #88

Closed sam97 closed 4 years ago

sam97 commented 4 years ago

When a function is provided as parameter, the return value, if it exists, is used as the new parsedPath. Otherwise, as earlier, the passed parameter is used assuming it has been modified accordingly.

Fixes #85

yocontra commented 4 years ago

Can you include a test + doc updates for this change?

sam97 commented 4 years ago

I've added another test that I thought would fit, along with some doc changes. Let me know if I've missed anything.

Also let me know if the commits need to be re-arranged or squashed. I'm not aware of the policies.

yocontra commented 4 years ago

@sam97 Thanks, I'll publish this as a breaking change since some users may have been relying on the function return value being discarded

sam97 commented 4 years ago

No problem at all! Thanks for the opportunity. :)

Makes sense to play it safe. A suggestion I'd make is that if there are any other breaking changes planned then this could be shelved to ship along with those.