Skip to content

How to publish a plugin in jQuery Plugin Registry

Lin Clark edited this page Feb 18, 2015 · 7 revisions

How to publish a plugin in jQuery Plugin Registry

After months under construction, the new jQuery Plugin Registry has finally arrived!

Quite a few things have changed (for those who previously published jQuery plugins there) so this guide will show you how to do it.

Step 0 - Create a plugin

If you are here and still never created a jQuery plugin, here's your chance to get started. Use jQuery Boilerplate and be happy :)

Step 1 - Create a Package Manifest

Create a file called yourPluginName.jquery.json, it will list all the informations about your plugin.

Feel free to follow this sample:

{
  "name": "boilerplate",
  "title": "jQuery Boilerplate",
  "description": "A jump-start for jQuery plugins development.",
  "keywords": [
    "jquery-plugins",
    "boilerplate"
  ],
  "version": "3.2.0",
  "author": {
    "name": "Zeno Rocha",
    "url": "https://github.com/zenorocha"
  },
  "maintainers": [
    {
      "name": "Addy Osmani",
      "url": "https://github.com/addyosmani"
    }
  ],
  "licenses": [
    {
      "type": "MIT",
      "url": "http://www.opensource.org/licenses/mit-license.php"
    }
  ],
  "bugs": "https://github.com/jquery-boilerplate/boilerplate/issues",
  "homepage": "http://jqueryboilerplate.com",
  "docs": "https://github.com/jquery-boilerplate/boilerplate#readme",
  "download": "https://github.com/jquery-boilerplate/boilerplate/archive/master.zip",
  "dependencies": {
    "jquery": ">=1.4"
  }
}

If you have any doubts about its attributes, visit here.

Step 2 - Create a public repository on Github

You can't escape from Github anymore to create your jQuery plugin.

So if you haven't create a repository yet, go ahead and create!

Step 3 - Add a Post-Receive Hook

Now that you have created your Github repository, we'll need to do a basic configuration.

3.1 - Open your repo on GitHub and go to its settings page

3.2 - Click "Service Hooks"

3.3 - Click "WebHook URLs"

3.4 - Enter this URL http://plugins.jquery.com/postreceive-hook and click "Update Settings"

Step 4 - Publish a version

Again another simple step if you're already familiar with Git.

Just need to create a tag with your plugin's version:

git tag 0.1.0
git push origin --tags

If you did all the steps in the right way, now you can see your plugin there \o/

Whenever you want to update your plugin, just publish a new tag.

Troubles?

If you have any trouble, please go to the official support channels:

More information