Name: grunt-sed
Owner: Bootstrap
Description: Grunt plugin for search and replace.
Created: 2015-04-09 06:47:31.0
Updated: 2017-12-13 19:22:47.0
Pushed: 2016-07-18 07:15:42.0
Size: 21
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a fork of the original repo with the changes we needed since things were going pretty slow upstream.
Built on top of replace, grunt-sed is a Grunt plugin for performing search and replace on files.
This plugin is a multi task, meaning that Grunt will automatically iterate over all exec targets if a target is not specified.
path
- File or directory to search. Defaults to '.'
.pattern
- String or regex that will be replaced by replacement
. Required.replacement
- The string that will replace pattern
. Can be a function. Required.recursive
- If true
, will recursively search directories. Defaults to false
.include
- String or array of files to include.exclude
- String or array of files/folders to exclude.t.initConfig({
g: grunt.file.readJSON('package.json'),
d: {
version: {
pattern: '%VERSION%',
replacement: '<%= pkg.version %>',
recursive: true,
exclude: ['*.min.js', 'node_modules']
}
Copyright (c) 2013 Jake Harding
Licensed under the MIT License.