Skip to content

sgurenkov/gulp-stitch-sourcemap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

file String Destination file name
packanges Array string array of package paths related to the directory from where you start your gulp task

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/'));
});

About

gulp stitch plugin with sourcemaps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages