Created
September 16, 2014 15:09
-
-
Save kbshl/984325fe55c8f82b82e6 to your computer and use it in GitHub Desktop.
Gulp Receipe: Using multiple sources in one task
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// npm install --save-dev gulp merge-stream | |
var gulp = require('gulp'); | |
var merge = require('merge-stream'); | |
gulp.task('test', function() { | |
var bootstrap = gulp.src('bootstrap/js/*.js') | |
.pipe(gulp.dest('public/bootstrap')); | |
var jquery = gulp.src('jquery.cookie/jquery.cookie.js') | |
.pipe(gulp.dest('public/jquery')); | |
return merge(bootstrap, jquery); | |
}); | |
// gulp.src will emit files in the order they were added: | |
// npm install gulp gulp-concat | |
var gulp = require('gulp'); | |
var concat = require('gulp-concat'); | |
gulp.task('default', function() { | |
return gulp.src(['foo/*', 'bar/*']) | |
.pipe(concat('result.txt')) | |
.pipe(gulp.dest('build')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment