From a9c8a1929fe78057d55274ee8f10b26993357b52 Mon Sep 17 00:00:00 2001 From: Scott Nelson Date: Thu, 6 Feb 2014 16:00:04 -0500 Subject: [PATCH] Added CommonJS support --- Sortable.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sortable.js b/Sortable.js index 800a5b7..20e465f 100644 --- a/Sortable.js +++ b/Sortable.js @@ -11,6 +11,9 @@ if( typeof define === "function" && define.amd ){ define(factory); } + else if( typeof module != "undefined" && typeof module.exports != "undefined" ){ + module.exports = factory(); + } else { window["Sortable"] = factory(); }