0.0.33 • Published 12 years ago

browser-export v0.0.33

Weekly downloads
14
License
-
Repository
github
Last release
12 years ago

#BrowserX

A module for Express to export JS modules to the browser.

Write your client side javascript as node modules. Keep it with your server side code. Maintain one code base. Export your client side modules to the browser.

BrowsereXport. See?

##Usage

// make sure you've already defined app.
// it adds the object 'browserx' to app.locals, for use later on.
var browserx = require('browserx')({ applicationRoot : __dirname, locals : app.locals });

// add some middleware
app.use(browserx.middleware());

// Then in your layout.jade, give browserx your entry point JS.
// Make sure it's a path relative to /app.js, not the template.
!= browserx.upload('./lib/client.js')

##Status

Hideously early. Works like Browserify, but without requiring a build step or unit tests.