gulp-concat-multi
v1.0.1
Published
Gulp plugin to concatenate multiple sets of files
Downloads
1,053
Readme
gulp-concat-mutli
A wrapper around gulp-concat that allows you to define multiple sets of files, which each combine into their own unique file.
Installation
You know how we do.
npm install gulp-concat-multi --save
Usage
gulp-concat-multi is used in place of gulp.src()
. It concatenates your sets of files and then returns a stream of the combined files for you to mess with further.
var concat = require('gulp-concat-multi');
function scripts() {
concat({
'vendor.js': 'js/vendor/**/*.js',
'app.js': ['js/lib/**/*.js', 'js/app.js']
})
.pipe(uglify())
.pipe(gulp.dest('dist/js'));
}
Any options supported by gulp-concat can be passed as the second parameter.
function scripts() {
var opts = { newLine: ';' };
concat({
'vendor.js': 'js/vendor/**/*.js',
'app.js': ['js/lib/**/*.js', 'js/app.js']
}, opts)
.pipe(uglify())
.pipe(gulp.dest('dist/js'));
}
No source map support at the moment.