From 17e5166b1120114c5eaf4dac046d15dec563bfc5 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Thu, 19 Feb 2015 11:41:51 +0000 Subject: [PATCH] Added proper commonjs support --- jquery.smooth-scroll.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jquery.smooth-scroll.js b/jquery.smooth-scroll.js index 0f6279a..5158e7f 100644 --- a/jquery.smooth-scroll.js +++ b/jquery.smooth-scroll.js @@ -9,6 +9,9 @@ if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['jquery'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS + factory(require('jquery')); } else { // Browser globals factory(jQuery);