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 4f3f188 commit 4f6d4ad
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
bower_components
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rekord-validation",
"version": "1.4.2",
"version": "1.4.3",
"homepage": "https://github.com/Rekord/rekord-validation",
"authors": [
"Philip Diffenderfer <[email protected]>"
Expand Down
32 changes: 28 additions & 4 deletions build/rekord-validation.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
/* rekord-validation 1.4.2 - Advanced validation rules for rekord by Philip Diffenderfer */
(function(global, Rekord, undefined)
/* rekord-validation 1.4.3 - Advanced validation rules 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 Database = Rekord.Database;
var Promise = Rekord.Promise;
Expand Down Expand Up @@ -1997,7 +2020,6 @@ Validation.Rules.unbase64 = function(field, params, database, alias, message)
};



Rekord.Validation = Validation;

Rekord.ruleGenerator = ruleGenerator;
Expand All @@ -2022,4 +2044,6 @@ Validation.Rules.unbase64 = function(field, params, database, alias, message)
Rekord.checkNoParams = checkNoParams;
Rekord.generateMessage = generateMessage;

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

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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/rekord-validation.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-validation",
"version": "1.4.2",
"version": "1.4.3",
"description": "Advanced validation rules for rekord",
"author": "Philip Diffenderfer",
"license": "MIT",
Expand Down
5 changes: 3 additions & 2 deletions src/footer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


Rekord.Validation = Validation;

Rekord.ruleGenerator = ruleGenerator;
Expand All @@ -24,4 +23,6 @@
Rekord.checkNoParams = checkNoParams;
Rekord.generateMessage = generateMessage;

})(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 Database = Rekord.Database;
var Promise = Rekord.Promise;
Expand Down
2 changes: 1 addition & 1 deletion test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script src="http://code.jquery.com/qunit/qunit-1.19.0.js"></script>

<!-- Rekord -->
<script src="http://rawgit.com/Rekord/rekord/master/build/rekord.js"></script>
<script src="../bower_components/rekord/build/rekord.js"></script>

<!-- Build -->
<script src="../build/rekord-validation.js"></script>
Expand Down

0 comments on commit 4f6d4ad

Please sign in to comment.