Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Stitch your CommonJS modules together for the browser [with extra features]
CoffeeScript

This branch is 8 commits ahead, 4 commits behind sstephenson:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
src
test
.gitignore
Cakefile
LICENSE
README.md
package.json

README.md

Develop and test your JavaScript applications as CommonJS modules in Node.js. Then Stitch them together to run in the browser.

npm install stitch-extra

Bundle code in lib/ and vendor/ and serve it with Express:

var stitch  = require('stitch-extra');
var express = require('express');

var package = stitch.createPackage({
  paths: [__dirname + '/lib', __dirname + '/vendor']
});

var app = express.createServer();
app.get('/application.js', package.createServer());
app.listen(3000);

Or build it to a file:

var stitch  = require('stitch-extra');
var fs      = require('fs');

var package = stitch.createPackage({
  paths: [__dirname + '/lib', __dirname + '/vendor']
});

package.compile(function (err, source){
  fs.writeFile('package.js', source, function (err) {
    if (err) throw err;
    console.log('Compiled package.js');
  })
})

What's extra?

This is a fork from @sstephenson's stitch.

Extra features in this fork include:

  • ignore certain directories by passing an array of regular expressions in ignore

See tests for examples.

Something went wrong with that request. Please try again.