From 1046b6d6de192910c5fc12be2fcca2502c77baa4 Mon Sep 17 00:00:00 2001 From: Raphael Amorim Date: Fri, 8 Jan 2016 18:36:47 -0200 Subject: [PATCH] support commonjs --- jquery.color.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jquery.color.js b/jquery.color.js index 98c6dd1..4ed6f70 100644 --- a/jquery.color.js +++ b/jquery.color.js @@ -13,6 +13,8 @@ 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); }