1.0.1 • Published 6 years ago

gulp-modify-file v1.0.1

Weekly downloads
13,590
License
MIT
Repository
github
Last release
6 years ago

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