0.5.20 • Published 9 years ago

stitchw v0.5.20

Weekly downloads
6
License
-
Repository
github
Last release
9 years ago

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

9 years ago

0.5.18

9 years ago

0.5.17

9 years ago

0.5.16

10 years ago

0.4.16

10 years ago

0.3.16

10 years ago

0.3.15

11 years ago

0.3.12

11 years ago

0.3.10

11 years ago

0.3.9

11 years ago

0.3.8

11 years ago

0.3.7

12 years ago

0.3.6

12 years ago

0.3.5

12 years ago

0.3.4

12 years ago