With the official launch of Meteor, is there a solid way to use NPM packages? I'm trying to use embed.ly but I don't see any straightforward way to do so.
Also, as a meteor novice, how do I include packages in my files? I don't see any 'require' or 'exports' functions.
Thanks!
You can install
meteorhacks:npm
Meteor will then stop. You can then edit the new package.json file
Then when you start Meteor it will install the npm modules for you.
Usage would as follows (use
Meteor.npmRequire
instead ofrequire
)In the new "localmarket" example, they include a npm package in the package directory like this:
and in the package.js file:
You can install this package https://github.com/meteorhacks/npm first. Then use it to require other NPM packages.