"main": "foo/bar"
...for example will try to find "bar.js" in the "foo" folder. The module.exports object specified in the .js file specified in main will be returned. For example:
module.exports=baz;
...will return a baz variable which might be newed up like so:
var baz = {};
...and may have functions bolted onto it like this:
baz.run = function() {
return "qux!";
};
No comments:
Post a Comment