SkillAgentSearch skills...

Stitch

Stitch your CommonJS modules together for the browser

Install / Use

/learn @sstephenson/Stitch
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<img src="https://github.com/downloads/sstephenson/stitch/logo.jpg" width=432 height=329>

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

npm install stitch

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

var stitch  = require('stitch');
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');
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');
  })
})
View on GitHub
GitHub Stars1.0k
CategoryDevelopment
Updated3d ago
Forks80

Languages

CoffeeScript

Security Score

95/100

Audited on Mar 23, 2026

No findings