Vladeksh / gulp-modify-file

Gulp plugin allow modify file in .pipe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gulp plugin allow modify file in .pipe

const gulp = require('gulp')

gulp.task('js', () => {
    const modifyFile = require('gulp-modify-file')

    return gulp
    .src('app/**/*.js')
    .pipe(modifyFile((content, path, file) => {
        const start = '(function (){\n'
        const end = '\n})()'

        return `${start}${content}${end}`
    }))
    .pipe(gulp.dest('build'))
})

About

Gulp plugin allow modify file in .pipe

License:MIT License


Languages

Language:JavaScript 100.0%