Skip to content

Commit

Permalink
Define AMD module.
Browse files Browse the repository at this point in the history
  • Loading branch information
luhn authored and gnarf committed Jan 14, 2016
1 parent d72fdfe commit bc15d71
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 0 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
],
"moduleType": [
"amd",
"node",
"globals"
],
"ignore": [
Expand Down
12 changes: 10 additions & 2 deletions jquery.color.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@
*
* Date: @DATE
*/
(function( jQuery, undefined ) {

(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else {
factory(root.jQuery);
}
})(this, function( jQuery, undefined ) {

var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",

Expand Down Expand Up @@ -660,4 +668,4 @@ colors = jQuery.Color.names = {
_default: "#ffffff"
};

}( jQuery ));
});

0 comments on commit bc15d71

Please sign in to comment.