Skip to content

Commit 5472f95

Browse files
committed
common js suport
1 parent 7cc5271 commit 5472f95

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/gridstack.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
define(['jquery', 'lodash', 'jquery-ui/core', 'jquery-ui/widget', 'jquery-ui/mouse', 'jquery-ui/draggable',
99
'jquery-ui/resizable'], factory);
1010
}
11+
else if(typeof exports !== 'undefined') {
12+
var _ = require("lodash");
13+
try { jQuery = require('jquery'); } catch(e) {}
14+
factory(jQuery, _);
15+
}
1116
else {
1217
factory(jQuery, _);
1318
}

0 commit comments

Comments
 (0)