browserifymagic

more magical browserify middleware.

npm install browserifymagic
13 downloads in the last month

Build Status

browserifymagic

browserifymagic is here to make using Browserify for a bunch of things easier It is a Connect/Union middleware and Flatiron plugin that serves autogenerated Browserify bundles from your JS files.

Where do I get this awesomeness?

Why, npm of course!

npm install browserifymagic

How do I use this awesomeness?

Well, you just use it as middleware!

with Express:

var http = require('http');
var express = require('express');
var browserifymagic = require('browserifymagic');

var app = express();

app.use(browserifymagic(__dirname + '/client'));
app.use(express.static(__dirname + '/public'));

http.createServer(app).listen(3000);

Or with Flatiron, as a Broadway plugin:

var flatiron = require('flatiron');
var browserifymagic = require('browserifymagic');

var app = flatiron.app;
app.use(flatiron.plugins.http);

app.use(browserifymagic, {
    paths: __dirname + '/client'
});
app.use(flatiron.plugins.static, __dirname + '/public');

app.start(3000);

There's also a bunch of examples for other frameworks.

browserifymagic(opts)

browserifymagic(path, opts)

Returns the browserifymagic middleware. opts will be passed along to Browserify. If path is given, it is prepended to opts.paths.

I think this could be awesomer!

Awesome, open an issue! If you're really awesome, send me a pull request!

npm loves you