-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This is a quick guide for integrating 3rd party libraries "officially" as a Meteor Package.
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.
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!
- Ask @dandv or @splendido in this issue for permission to fork the repo in the MeteorPackaging org.
- Fork the 3rd party library repo in the MeteorPackaging org
- Clone the forked repo locally to your machine
- 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. - Create a new
meteor-integrationbranch starting from the one identified above:git checkout -b meteor-integration devel. - Identify the build system in use (which is usually leveraged to keep files like
bower.json,composer.json, andcomponent.jsonup to date with new releases): grunt, gulp, make etc. - Hook into it to automatically generate the
package.jsfile needed formeteor publish(you can have a look at already presented PRs on this page to get some quick example and possibly copy/paste some code) - Figure out which files to add in the
package.jsfile. Don't add the minified or uglified files because Meteor already does that bundling. Look fordistfiles instead. - Test the modified build system
- Test the package locally with a simple test app
- Consider some known caveats
- Copy
package.jsinto the root directory of the project andmeteor publish --createthe new package to Atmosphere. - Push the new branch to the Meteor Packaging fork.
- Creating a new pull request against the development branch in the upstream repo, asking to merge the
meteor-integrationbranch from the forked repo. See this template PR text. - 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.
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:
- Log into your Meteor Developer account at http://meteor.com.
- 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.
- Add
meteorpublishto the organization's team - 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.)