Merge pull request #247 from parano/command-js-fix

Support for commonJS
This commit is contained in:
Pavel Reznikov 2015-10-13 16:07:12 -07:00
commit 922cc30ea7

View file

@ -8,6 +8,11 @@
define(['jquery', 'lodash', 'jquery-ui/core', 'jquery-ui/widget', 'jquery-ui/mouse', 'jquery-ui/draggable',
'jquery-ui/resizable'], factory);
}
else if (typeof exports !== 'undefined') {
try { jQuery = require('jquery'); } catch(e) {}
try { _ = require('lodash'); } catch(e) {}
factory(jQuery, _);
}
else {
factory(jQuery, _);
}