Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
liberate your node packages -- put them in your web libraries!
CoffeeScript JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


I wanted NPM to manage my JavaScript libraries. However, I wasn't working on node projects, I was working on sharpening my CoffeeScript in the browser.

Then, it hit me:

liberator = require('liberator');
liberator.include(['mootools-object', 'mootools-array', 'underscore']);

should return all the JavaScript libraries needed to build my web app.

Get it

npm install liberator

But wait -- there's more

Like the idea of using require(module-name) in your webdev JavaScript? Liberator's got that too. NOTE: It's not very smart just yet, but it can be pretty nifty. Check out the known issues section below.

 liberator = require('liberator');
 liberator.require(['mootools-core', 'underscore'])

Now you can call something like

 var _ = require('underscore');

Ain't that nice?

If you happen to develop on it

Just run cake and see your options.

Known Issues

  • Using liberator.require requires you to list all required dependencies, including dependencies in your dependencies, and so on.
  • Using liberator.require, some node modules like to call relative path modules such as require("./lib/libstuff") ... liberator isn't smart enough to work with this yet.
  • Honestly though, using NPM as your web library dependency manager can get pretty nifty.
Something went wrong with that request. Please try again.