Skip to content

Commit b541240

Browse files
callumacraekswedberg
authored andcommitted
Add proper commonjs support. Closes kswedberg#74
1 parent 4e52f7e commit b541240

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jquery.smooth-scroll.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
if (typeof define === 'function' && define.amd) {
1010
// AMD. Register as an anonymous module.
1111
define(['jquery'], factory);
12+
} else if (typeof module === 'object' && module.exports) {
13+
// CommonJS
14+
factory(require('jquery'));
1215
} else {
1316
// Browser globals
1417
factory(jQuery);

0 commit comments

Comments
 (0)