gulp-inject-string
gulp-inject-string copied to clipboard
Ability to use an object for performing many replacements in a single call
I modified the replace function to take a dictionary of key/value pairs as a JSON object and replace them all in one go. For example I have a file with various placeholders that I want to transform. Hopefully this will be useful to other users of this project.
gulpInjectString.replace({
"{{ key1 }}": "value 1",
"{{ key2 }}": "value 2"
// ... etc ...
})