gulp-add

0.1.0 • Public • Published

gulp-add

NPM version Build Status Downloads

Add files by contents at any point in the pipeline.

Install:

npm install gulp-add --save-dev

Example:

var add = require('gulp-add');
 
gulp.task('some-task', function() {
    return gulp.src(['some files'])
        .pipe(add('filename1.txt', 'First file contents'))
        .pipe(add({
            'filename2.txt': 'Second file contents',
            'filename3.txt': 'Third file contents'
        }))
        .pipe(gulp.dest('./build'));
});

By default, new files are being added to the end of the stream. You can insert new files in the beginning of the stream:

.pipe(add('filename1.txt', 'First file contents', true))

or

.pipe(add({
    'filename2.txt': 'Second file contents',
    'filename3.txt': 'Third file contents'
}, true))

Package Sidebar

Install

npm i gulp-add

Weekly Downloads

204

Version

0.1.0

License

MIT

Unpacked Size

5.25 kB

Total Files

6

Last publish

Collaborators

  • hoho