jQueryのプラグインをつくるのを助けてくれる  jQuery Plugin Boilerplate

jQueryを使用するモジュールをつくっていて、
せっかくなのでプラグインっぽくつくろうと思ったときに
良さそうなのを見つけた。
http://stefangabos.ro/jquery/jquery-plugin-boilerplate-revisited/

テンプレになっていて、ソースコードを上書きしていけば出来る感じ。
javascriptの文法の勉強にもなるなぁと思いながらメモ。
冒頭はこんな感じ。

//remember to change every instance of "pluginName" to the name of your plugin!
(function($) {
// here we go!
$.pluginName = function(element, options) {

// plugin's default options
// this is private property and is accessible only from inside the plugin
var defaults = {

foo: 'bar',

// if your plugin is event-driven, you may provide callback capabilities
// for its events. execute these functions before or after events of your
// plugin, so that users may customize those particular events without
// changing the plugin's code
onFoo: function() {}

}