grunt-text-replace
grunt-text-replace copied to clipboard
General purpose text replacement for grunt. Allows you to replace text in files using strings, regexs or functions.
I've installed and configured the package correctly. Upon running "grunt replace" it just sits there. I ran "grunt replace -v" and it shows that it's just constantly running "replace" task...
So I needed the ability to also change the filename of the replaced files, so I added the ability to specify destination as a function, for example: ``` javascript replace:...
Is it possible to do something like: ``` from: /""\.[a-z0-9.]+\.css/g, ``` ? Putting them package name in manually works, however it would be useful if it could parse the template...
I have the following configuration: ``` js "style-image-refs": { src: ["app/assets/stylesheets/**/*.css"], overwrite: true, replacements: [ { from: "url(\"/images/", to: "url(\"/assets/" }, { from: "url(\"../images/", to: "url(\"/assets/" } ] } ```...
Just to display something.... Because I spent some time thinking that the gruntfile did not matched any file or pattern
Hello there, For some reason my regexp search and replace is no longer matching my selection - not sure which version this started happening with, however it used to work...
Add two parameters to "to" if "to" is a function. The fifth parameter of "to" is the path of source file, and the sixth is the path of destination file....
When running replace on a source target that contains a folder with a period in the title, the following error is thrown. ``` Warning: Unable to read "../testing/foo.bar" file (Error...
I'd like to do something like: ``` replacements: [{ from: /foo/, to: function(matchedWord, index, fullText, regexMatches, sourceFile) { grunt.log.writeln('Found "foo" in ' + sourceFile + ' replacing with "bar".'); return...
hello I would like to use regular expression to replace a specific function call with something else. specifically I made a function called isUndefined which returns true if the input...