Skip to content

Commit fb9b10a

Browse files
committed
Merge pull request aterrien#236 from beloglazov/master
Added a CommonJS module declaration
2 parents a897b87 + 91bbbbc commit fb9b10a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

js/jquery.knob.js

100755100644
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
* Thanks to vor, eskimoblood, spiffistan, FabrizioC
1212
*/
1313
(function (factory) {
14-
if (typeof define === 'function' && define.amd) {
14+
if (typeof exports === 'object') {
15+
// CommonJS
16+
module.exports = factory(require('jquery'));
17+
} else if (typeof define === 'function' && define.amd) {
1518
// AMD. Register as an anonymous module.
1619
define(['jquery'], factory);
1720
} else {

0 commit comments

Comments
 (0)