gulp-change-file-content
v1.0.1
Published
Gulp plugin allow modify file in .pipe
Downloads
316
Readme
Gulp plugin allow modify file in .pipe
const gulp = require( 'gulp' );
const changeFileContent = require( 'gulp-change-file-content' );
gulp.task( 'js', () => (
gulp.src( 'app/**/*.js' )
.pipe( changeFileContent( ( content, path, file ) => {
const start = '(function (){\n';
const end = '\n})()';
return `${ start }${ content }${ end }`;
} ) )
.pipe( gulp.dest( 'build' ) )
) );