Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

jquery-plugin-boilerplate

matthias-vogt10ISC0.0.3

Because boilerplate.

jquery, boilerplate, plugin, jquery plugin

readme

jQuery plugin boilerplate

npm install jquery-plugin-boilerplate --save

What it can do

  • nested options and defaults
  • .destroy() method ($elements.data("plugin_pluginName").destroy()`)
  • both $.fn.plugin and $.plugin()` syntax
  • prevent multiple instances on the same element
    • set overwrite or ignore behaviour
  • the whole prototype in one object literal
  • why are you reading this, just look at the code

Not very tested yet.

Inspired by https://github.com/jquery-boilerplate/jquery-boilerplate