gulp-change-file-content

1.0.1 • Public • Published

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

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i gulp-change-file-content

    Weekly Downloads

    96

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    2.44 kB

    Total Files

    4

    Last publish

    Collaborators

    • nk-o