Created
November 18, 2011 06:16
-
-
Save xiaotian/1375748 to your computer and use it in GitHub Desktop.
Backbone module
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(){ | |
// Initial Setup | |
// ------------- | |
// Save a reference to the global object. | |
var root = this; | |
// Save the previous value of the `Backbone` variable. | |
var previousBackbone = root.Backbone; | |
// Create a local reference to slice. | |
var slice = Array.prototype.slice; | |
// The top-level namespace. All public Backbone classes and modules will | |
// be attached to this. Exported for both CommonJS and the browser. | |
var Backbone; | |
if (typeof exports !== 'undefined') { | |
Backbone = exports; | |
} else { | |
Backbone = root.Backbone = {}; | |
} | |
// Current version of the library. Keep in sync with `package.json`. | |
Backbone.VERSION = '0.5.3'; | |
... | |
}).call(this) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment