CommonJS compatibility

This commit is contained in:
Steve Lamb 2014-02-20 10:06:30 -08:00 committed by Hyunje Alex Jun
parent b45a94971c
commit fc24bbc631

View File

@ -6,6 +6,9 @@
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module. // AMD. Register as an anonymous module.
define(['jquery'], factory); define(['jquery'], factory);
} else if (typeof exports === 'object') {
// Node/CommonJS
factory(require('jquery'));
} else { } else {
// Browser globals // Browser globals
factory(jQuery); factory(jQuery);