I have one library/object that is compatible with commonjs, and I have another library/object that adds itself to the first library/object.
Do I need to manually wrap the second library for commonjs or should it be accessible through the first library?
The two libraries I am using are backbone.js and backfire.js.
backbonejs already exports its objects and I can access them fine.
backfirejs adds to the backbone object:
Backfire.js:
Backbone.Firebase = function(ref) {
this._fbref = ref;
this._children = [];
if (typeof ref == "string") {
this._fbref = new Firebase(ref);
}
_.bindAll(this);
this._fbref.on("child_added", this._childAdded);
this._fbref.on("child_moved", this._childMoved);
this._fbref.on("child_changed", this._childChanged);
this._fbref.on("child_removed", this._childRemoved);
};
How can I access the Firebase object using commonjs?