Skip to content
/ gulp-add Public
forked from hoho/gulp-add

Add files by contents at any point in the pipeline

License

Notifications You must be signed in to change notification settings

Fuco1/gulp-add

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Add files by contents at any point in the pipeline

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%