Skip to content

Instantly share code, notes, and snippets.

@robomatic
Last active December 23, 2015 11:19
Show Gist options
  • Save robomatic/6627839 to your computer and use it in GitHub Desktop.
Save robomatic/6627839 to your computer and use it in GitHub Desktop.
Meteor 0.6.5 private package notes
Meteor managed packages reside in:
~/.meteor/packages
NPM packages managed in:
~/.npm
Place private package in folder i.e.
~/code/packages
export a path in .bash_profile for meteor
export PACKAGE_DIRS="User/<username>/code/packages"
// sample package.js
Package.describe({
summary: "World Map based on d3 topojson and Natural Earth Data"
});
for dependencies use: (will order the js files properly in the code)
Npm.depends({
"topojson": "1.4.0"
});
Package.on_use(function (api) {
// packages used by this package
api.use("templating", "client");
// add the file for reference in the app
api.add_files(["nebula_geo.html", "nebula_geo.css"], "client");
api.add_files("nebula_geo.js", "client");
// make sure to export the function as global
api.export("nebulageo");
});
Add package with:
meteor add <packagename>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment