Skip to content

Instantly share code, notes, and snippets.

@jonezy
Created November 19, 2013 19:18
Show Gist options
  • Save jonezy/7550911 to your computer and use it in GitHub Desktop.
Save jonezy/7550911 to your computer and use it in GitHub Desktop.
Boilerplate for JS module development.
(function() {
var root = this;
var MyLibrary = root.MyLibrary = {};
MyLibrary.version = '0.0.0';
var MyMethod = MyLibrary.MyMethod = function(options) {
this.options = options;
this.initialize.apply(this);
};
_.extend(MyMethod.prototype, {
ignoreThings: false,
initialize: function() {
console.log(this.options);
return this;
}
});
}).call(this);
@jonezy
Copy link
Author

jonezy commented Nov 19, 2013

if your wondering this is the backbone.js style of module development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment