gulp-replaces
v0.1.5
Published
Gulp plugin for replace strings in one pipe in files.
Downloads
6
Readme
gulp-replaces
Gulp plugin for replace strings in one pipe in files.
Install
$ npm i gulp-replaces -D
# or
$ yarn add gulp-replaces -D
Usage
// gulpfile.js
const gulp = require('gulp');
const replaces = require('gulp-replaces');
gulp.task('default', () => {
return gulp
.src('./src/main.js')
.pipe(replaces({
'process.env.NODE_ENV': JSON.stringify('development'),
'process.env.PORT': 3000,
}))
.pipe(gulp.dest('./dist'));
});