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 c148d4a commit 42952b6
Show file tree
Hide file tree
Showing 7 changed files with 60 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-migrations",
"version": "1.4.1",
"version": "1.4.2",
"homepage": "https://github.com/Rekord/rekord-migrations",
"authors": [
"Philip Diffenderfer <[email protected]>"
Expand Down
31 changes: 28 additions & 3 deletions build/rekord-migrations.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
/* rekord-migrations 1.4.1 - Migrations for rekord by Philip Diffenderfer */
(function(global, Rekord, undefined)
/* rekord-migrations 1.4.2 - Migrations for rekord 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'], function(Rekord) { // jshint ignore:line
return factory(root, Rekord);
});
}
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')); // jshint ignore:line
}
else
{
// Browser globals (root is window)
root.Rekord = factory(root, root.Rekord);
}
}(this, function(global, Rekord, undefined)
{

var Model = Rekord.Model;
var Collection = Rekord.Collection;
var Promise = Rekord.Promise;
Expand Down Expand Up @@ -694,4 +717,6 @@ function migrationLog()
Rekord.ApplicationMigrator = ApplicationMigrator;
Rekord.ModelMigrator = ModelMigrator;

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

}));
4 changes: 2 additions & 2 deletions build/rekord-migrations.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-migrations.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rekord-migrations",
"version": "1.4.1",
"version": "1.4.2",
"description": "Migrations for rekord",
"author": "Philip Diffenderfer",
"license": "MIT",
Expand Down
4 changes: 3 additions & 1 deletion src/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@
Rekord.ApplicationMigrator = ApplicationMigrator;
Rekord.ModelMigrator = ModelMigrator;

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

}));
25 changes: 24 additions & 1 deletion src/header.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
(function(global, Rekord, undefined)
// UMD (Universal Module Definition)
(function (root, factory)
{
if (typeof define === 'function' && define.amd) // jshint ignore:line
{
// AMD. Register as an anonymous module.
define(['Rekord'], function(Rekord) { // jshint ignore:line
return factory(root, Rekord);
});
}
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')); // jshint ignore:line
}
else
{
// Browser globals (root is window)
root.Rekord = factory(root, root.Rekord);
}
}(this, function(global, Rekord, undefined)
{

var Model = Rekord.Model;
var Collection = Rekord.Collection;
var Promise = Rekord.Promise;
Expand Down

0 comments on commit 42952b6

Please sign in to comment.