Package Exports
- gulp-batch-replace
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gulp-batch-replace) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
gulp-batch-replace
A gulp-replace fork for batch replacing files.
##Installation
npm install gulp-batch-replace
Usage
var replaceThis = [
[ 'original', 'replacement' ],
[ 'original1', 'replacement1' ],
[ 'original2', 'replacement2' ]
];
var replace = require('gulp-batch-replace);
gulp.task('example', function(){
gulp.src('foo.txt')
.pipe(replace(replaceThis))
.pipe(gulp.dest('bar/'));
});
API
gulp-batch-replace can be called with a string or regex.
replace(array)
array
Should contain subarrays, where the first value is the search parameter (string or regexp) and the second value is the replacement value (string).
You can also mix search parameter types, for example:
var replaceMe = [
[ 'original', 'replacement' ],
[ /regexp/g, 'replacement' ],
...
];