Tips and tricks publishing javascript plugins at github

Join the chat at https://gitter.im/JoanClaret/tips-and-tricks-publishing-javascript-plugins-at-github

Name

  • Choose a comprehensive and descriptive name (this will make easier to find for search engines, crawlers and people). Example: angular-local-storage

  • If necessary, use "-" to separate words (DynamicMaxHeight is a bad example)

Readme file

  • Use a well structured readme file. Boilerplate boilerplate is a good starting point.

  • Describe detailed installation instructions if necessary. Easy to understand for all kind of developers. Elboletaire's tabbedcontent is a great example of that.

  • Online demos are absolutely necessary in all plugins that can be tested online. jcSlider uses a great one.

  • Use a preview image if you can. This will make easier to understand for users who are too lazy to read. Sweet alert is a great example.

  • Include your own, or third parties browser support badges. xtend have a great ones.

  • Encourage people to follow and star your plugin. Directly. Because why not.

  • Specify a license for your plugin and include it in the readme file, so everyboy will know the software permissions and warranties.

Promotion

  • Publish your plugin in npm or bower. If possible, make it browserify and require ready. Many people use it.

  • Publish your plugin in other pages such as jqueryplugins, jqueryrain.com... and all you can find.

  • Create a github page for your plugin. This will give a profesional style and will dive traffic to the plugin. Use github predefined themes, or download a template if you don't have time to create your own. Slide-and-swipe-menu is a good example.

  • Publish your plugin in related linkedIn group pages such as jQuery, Javascript, Front-end developer network.

  • If you have various plugins, show them as "other interesting plugins" or "more from this author" at the bottom of the readme.md file, using your plugin page URL. This will be useful for users, and will create more incoming links (from github, npm, jqueryrain ...) to your plugin pages, which is also good for SEO purposes. (github and other pages links does not have "nofollow" attribute).

Code

  • Use code styleguides. For example Google or Airbnb styleguides. Better code suggest a better plugin.
  • Use an organized folders structure. Nucliweb use a great one for html/js/sass projects, but you can find many others suitable for your plugin.
  • Test your code and add badges. https://travis-ci.org

Statistics

The community

  • Encourage people to improve it. Fork and improve also this guide if you want!