Skip to content
Dan Dascalescu edited this page Feb 5, 2015 · 17 revisions

This is a quick guide for integrating 3rd party libraries "officially" as a Meteor Package.

Aims

Eventually get one single official Meteor package for each popular 3rd party library which is automatically kept up to date with the latest release of the library.

How

The library should be forked in the MeteorPackaging organization, and a lean PR should be created that adds Meteor integration. Optionally, that pull request could be made against the upstream repo of the original library, in case the author wants to integrate Meteor support in its repo.

We want to eventually get the repository enabled on autopublish.meteor.com together with a working webhook!

Step by Step Guide

  1. Ask @dandv or @splendido in this issue for permission to fork the repo in the MeteorPackaging org.
  2. Fork the 3rd party library repo in the MeteorPackaging org
  3. Clone the forked repo locally to your machine
  4. Read CONTRIBUTING.md and identify which branch is used for development (might be master, devel, next, future, etc...). Usually it is the one with more recent commits.
  5. Create a new meteor-integration branch starting from the one identified above: git checkout -b meteor-integration devel.
  6. Identify the build system in use (which is usually leveraged to keep files like bower.json, composer.json, and component.json up to date with new releases): grunt, gulp, make etc.
  7. Hook into it to automatically generate the package.js file needed for meteor publish (you can have a look at already presented PRs on this page to get some quick example and possibly copy/paste some code)
  8. Figure out which files to add in the package.js file. Don't add the minified or uglified files because Meteor already does that bundling. Look for dist files instead.
  9. Test the modified build system
  10. Test the package locally with a simple test app
  11. Consider some known caveats
  12. Copy package.js into the root directory of the project and meteor publish --create the new package to Atmosphere.
  13. Push the new branch to the Meteor Packaging fork.
  14. Creating a new pull request against the development branch in the upstream repo, asking to merge the meteor-integration branch from the forked repo. See this template PR text.
  15. Add a reference to the newly created PR on this page, taking care to update its status through time.

For more detailed instructions, see the original "How to do this" section in the "Official Meteor integrations" thread.

Users and Organizations

At the moment we need the meteorpublish user to be registered among the maintainers of the package to be published in order for the procedure used by autopublish.meteor.com to work.

So when starting a new integration attempt you should do the following:

  1. Log into your Meteor Developer account at http://meteor.com.
  2. Register a new organization with a name sounding as official as possible, i.e. close to the library's name. If the name is already taken, contact @dandv to be transferred control.
  3. Add meteorpublish to the organization's team
  4. Add also other users that might be willing to participate in keeping the package monitored and up to date (e.g., official library maintainers, other users which used to have old wrapper packages for the same library, etc.)

Clone this wiki locally