Skip to content

Ability to use an object for performing many replacements in a single call - #7

Open
garrypas wants to merge 5 commits into
mikehazell:masterfrom
garrypas:master
Open

Ability to use an object for performing many replacements in a single call#7
garrypas wants to merge 5 commits into
mikehazell:masterfrom
garrypas:master

Conversation

@garrypas

Copy link
Copy Markdown

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 ...
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant