Created
November 19, 2013 19:18
-
-
Save jonezy/7550911 to your computer and use it in GitHub Desktop.
Boilerplate for JS module development.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if your wondering this is the backbone.js style of module development.