gulp-inject-string
gulp-inject-string copied to clipboard
Version 2.0.0 release
This PR will be released as v2.0.0
Breaking change:
replace now matches the Javascript String.replace API. It can take a String or a RegExp
as the search parameter. If given a string it will only replace the first instance of that string.
To replace all instances of a string use the new method replaceAll.
Feature
New method inject.custom takes a method as it's only argument. This method will be called
with the entire content of the file as a String and should return a String. Beyond that
you can do what ever you want inside custom.
Thanks to Eugene Zhuchenko for that one and for his patience. It took me a while to merge this.
resolves #8 and #5
@evanre - I'd love you to have a look over this if you have time and maybe test against an existing project to make sure I'm not breaking anything I didn't expect.
I've been using this branch for a couple of months of daily testing and it's been working without problems for me 👍🏽