A string replace plugin for gulp
Install using npm.
npm install gulp-str-replace --save-dev
var gulp = require('gulp');
var replace = require('gulp-str-replace');
gulp.task("str-replace", function(){
gulp.src([paths.build "/**/*.html", paths.build "/**/*.css"])
.pipe(replace({
original : {
activityVersion : /\@{3}ACTIVITY_VERSION\@{3}/g,
lotusVersion : /\@{3}LOTUS_VERSION\@{3}/g
},
target : {
activityVersion : "0.0.2",
lotusVersion : "0.0.3"
}
}))
.pipe(gulp.dest(paths.build))
});
gulp.task('default', ['str-replace']);