Skip to content

Commit

Permalink
Merge pull request #35 from Promhize/master
Browse files Browse the repository at this point in the history
 Added commonjs module specification
  • Loading branch information
buzinas authored Feb 25, 2018
2 parents 794a0b3 + c6e3f6f commit 7dff9d3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
13 changes: 10 additions & 3 deletions simple-scrollbar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
(function(w, d) {
;(function(root, factory) {
if (typeof exports === 'object') {
module.exports = factory(window, document)
} else {
root.SimpleScrollbar = factory(window, document)
}
})(this, function(w, d) {
var raf = w.requestAnimationFrame || w.setImmediate || function(c) { return setTimeout(c, 0); };

function initEl(el) {
Expand Down Expand Up @@ -118,5 +124,6 @@
ss.initEl = initEl;
ss.initAll = initAll;

w.SimpleScrollbar = ss;
})(window, document);
var SimpleScrollbar = ss;
return SimpleScrollbar;
});
6 changes: 1 addition & 5 deletions simple-scrollbar.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7dff9d3

Please sign in to comment.