Chapter 7. Test, package, and document your plugin

This chapter covers

  • Testing your plugin
  • Packaging your plugin for distribution
  • Documenting and demonstrating your plugin

Once you’ve written your new plugin, you probably want to make it available to the wider jQuery community. To give it the best chance of competing with other plugins that provide similar functionality, you should ensure that it works as expected in all situations. Using a testing suite such as QUnit lets you create a series of repeatable tests for a wide range of scenarios for your plugin, in the familiar environment of a web browser.

You should also provide potential users with a package that includes everything they need to implement your plugin. As well as the plugin ...

Get Extending jQuery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.