gulp-replace-assets
v0.0.4
Published
A batch replace plugin for gulp
Downloads
213
Maintainers
Readme
gulp-replace-assets
A gulp-batch-replace fork for batch replacing files according
assets.json
file, provided by gulp-hash
##Installation
npm install gulp-replace-assets
Usage
var replaceThis = {
"original": "replacement",
"original1": "replacement1",
"original2": "replacement2"
};
var replaceAssets = require('gulp-replace-assets');
gulp.task('example', function(){
gulp.src('foo.txt')
.pipe(replaceAssets(replaceThis))
.pipe(gulp.dest('bar/'));
});
API
gulp-replace-assets can be called with a string or regex.
replace(object)
object
Should contain keys/values, where the key the search parameter (string) and the value is the replacement value (string).