1.0.4 • Published 9 years ago
gulp-stitch-sourcemap v1.0.4
Gulp stitch plugin with sourcemap support
It allows you to use CommonJS modules in browser bundled in one file. Supports sourcemaps.
Actual implementation of Stitch object is borrowed from https://github.com/sstephenson/stitch. Inspired by https://github.com/thrillerwu/gulp-stitch.
Params
stitch(file, packages);
Usage
var stitch = require('gulp-stitch-sourcemap');
var sourcemap = require('gulp-sourcemaps');
var coffee = require('gulp-coffee');
gulp.task('stitch', function() {
return gulp.src('./app/**/*.js', './vendor/**/*.js')
.pipe(sourcemaps.init())
.pipe(coffee({bare: true})
.pipe(stitch('bundle.js', ['lib', 'vendor']))
.pipe(sourcemaps.write())
.pipe(gulp.dest('./dist/'));
});