Node module hacks encapsulated
Switch branches/tags
Latest commit d502e50 Sep 12, 2012 @possibilities possibilities bumped version
Failed to load latest commit information.

Node Modules for Meteor

Node module hacks encapsulated

There's not really a whole lot going on here. We needed a way to encapsulate Meteor's current node module hacks so we can depend on common packages without being bound to a common strategy.


Deploying to

The only way to bundle a node module at this point is to include it in the public/. Yes this is a terrible hack and all the files in your node modules will be reachable along with your apps legitimate assets. If you don't mind all of this you don't have to do anything but install the node-modules and load modules like this:

var awssum = NodeModules.require('awssum');

Deploying elsewhere

If you're not deploying to you might have the ability to place your node modules wherever you choose. If the module is available to nodejs's require() you don't have to do anything special. Require your modules just like the example above.

You can also tell node-modules where your packages are located using NodeModules.setPath():

var awssum = NodeModules.require('awssum');