Skip to content

blue68/gulp-replace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-str-replace Build Status

A string replace plugin for gulp

Install

Install using npm.

npm install gulp-str-replace --save-dev

Usage

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']);

About

gulp-字符串替换插件

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published