diff --git a/bower.json b/bower.json index 2ac30c6..5e6cefd 100644 --- a/bower.json +++ b/bower.json @@ -1,5 +1,20 @@ { "name": "jquery-color", + "description": "jQuery plugin for color manipulation and animation support.", + "main": [ + "jquery.color.js" + ], + "moduleType": [ + "amd", + "node", + "globals" + ], + "ignore": [ + "**/.*", + "Gruntfile.js", + "external", + "test" + ], "devDependencies": { "qunit": "1.14.0", "jquery-1.5.0": "jquery#1.5.0", diff --git a/jquery.color.js b/jquery.color.js index 99b699a..4ed6f70 100644 --- a/jquery.color.js +++ b/jquery.color.js @@ -8,7 +8,17 @@ * * Date: @DATE */ -(function( jQuery, undefined ) { + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['jquery'], factory); + } else if (typeof exports === 'object') { + module.exports = factory(require('jquery')); + } else { + factory(root.jQuery); + } +})(this, function( jQuery, undefined ) { var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", @@ -660,4 +670,4 @@ colors = jQuery.Color.names = { _default: "#ffffff" }; -}( jQuery )); +});