Skip to content

Commit

Permalink
Switched to UMD.
Browse files Browse the repository at this point in the history
  • Loading branch information
ClickerMonkey committed Oct 30, 2016
1 parent 0f1cb3d commit 4823aaa
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rekord-pubsub",
"version": "1.4.1",
"version": "1.4.2",
"homepage": "https://github.com/Rekord/rekord-pubsub",
"authors": [
"Philip Diffenderfer <pdiffenderfer@gmail.com>"
Expand Down
31 changes: 28 additions & 3 deletions build/rekord-pubsub.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
/* rekord-pubsub 1.4.1 - A rekord binding to pubsub - implementing Rekord.live by Philip Diffenderfer */
(function(global, Rekord, PubSub)
/* rekord-pubsub 1.4.2 - A rekord binding to pubsub - implementing Rekord.live by Philip Diffenderfer */
// UMD (Universal Module Definition)
(function (root, factory)
{
if (typeof define === 'function' && define.amd) // jshint ignore:line
{
// AMD. Register as an anonymous module.
define(['Rekord', 'PubSub'], function(Rekord, PubSub) { // jshint ignore:line
return factory(root, Rekord, PubSub);
});
}
else if (typeof module === 'object' && module.exports) // jshint ignore:line
{
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module.exports = factory(global, require('Rekord'), require('PubSub')); // jshint ignore:line
}
else
{
// Browser globals (root is window)
root.Rekord = factory(root, root.Rekord, root.PubSub);
}
}(this, function(global, Rekord, PubSub, undefined)
{

var OP_SAVE = 1;
var OP_REMOVE = 2;

Expand Down Expand Up @@ -78,4 +101,6 @@

Rekord.setLive( LiveFactory, true );

})( this, this.Rekord, this.PubSub );
return Rekord;

}));
4 changes: 2 additions & 2 deletions build/rekord-pubsub.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/rekord-pubsub.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rekord-pubsub",
"version": "1.4.1",
"version": "1.4.2",
"description": "A rekord binding to pubsub - implementing Rekord.live",
"author": "Philip Diffenderfer",
"license": "MIT",
Expand Down Expand Up @@ -28,6 +28,7 @@
"jshint": "^2.9.2"
},
"dependencies": {
"clickermonkey-pubsubjs": "*",
"rekord": "~1.4.0"
}
}
29 changes: 27 additions & 2 deletions src/pubsub.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
(function(global, Rekord, PubSub)
// UMD (Universal Module Definition)
(function (root, factory)
{
if (typeof define === 'function' && define.amd) // jshint ignore:line
{
// AMD. Register as an anonymous module.
define(['Rekord', 'PubSub'], function(Rekord, PubSub) { // jshint ignore:line
return factory(root, Rekord, PubSub);
});
}
else if (typeof module === 'object' && module.exports) // jshint ignore:line
{
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module.exports = factory(global, require('Rekord'), require('PubSub')); // jshint ignore:line
}
else
{
// Browser globals (root is window)
root.Rekord = factory(root, root.Rekord, root.PubSub);
}
}(this, function(global, Rekord, PubSub, undefined)
{

var OP_SAVE = 1;
var OP_REMOVE = 2;

Expand Down Expand Up @@ -77,4 +100,6 @@

Rekord.setLive( LiveFactory, true );

})( this, this.Rekord, this.PubSub );
return Rekord;

}));

0 comments on commit 4823aaa

Please sign in to comment.