Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "backpusher",
"version": "0.0.3",
"homepage": "https://github.com/fetch/backpusher",
"authors": [
"Koen Punt <koen@fetch.nl>"
],
"description": "Backpusher is a library for using Pusher to sync your Backbone models between clients, the server and other clients.",
"main": "src/backpusher.js",
"moduleType": [
"amd",
"globals"
],
"keywords": [
"pusher",
"backbone",
"push",
"realtime"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
22 changes: 17 additions & 5 deletions src/backpusher.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
// Backpusher.js 0.0.2
// Backpusher.js 0.0.3
// (c) 2011-2012 Pusher.
// (c) 2014 Koen Punt (koen@fetch.nl).
// Backpusher may be freely distributed under the MIT license.
// For all details and documentation:
// http://github.com/pusher/backpusher

;(function(exports, undefined){
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['backbone'], factory);
} else if (typeof exports === 'object') {
// CommonJS
module.exports = factory(require('backbone'));
} else {
// Browser globals
root.Backpusher = factory(root.Backbone);
}
})(this, function(Backbone, undefined){
// The top-level namespace. All public Backbone classes and modules will
// be attached to this. Exported for both CommonJS and the browser.
var Backpusher = function(channel, collection, options) {
Expand Down Expand Up @@ -103,6 +115,6 @@
return origBackboneSync(method, model, options);
};

// Export:
exports.Backpusher = Backpusher;
})((typeof exports !== 'undefined' ? exports : this));
return Backpusher;

});