feat(gridster): Common.js support

Closes #434
This commit is contained in:
joaoafrmartins
2015-04-14 11:43:35 +02:00
committed by Javi Sánchez-Marín
parent ccbac1fcc3
commit 446852a260
5 changed files with 18 additions and 11 deletions
+3 -2
View File
@@ -7,8 +7,9 @@
*/
;(function(root, factory) {
if (typeof define === 'function' && define.amd) {
if (typeof exports === 'object') {
module.exports = factory(require('jquery'), require('./jquery.coords.js'));
} else if (typeof define === 'function' && define.amd) {
define('gridster-collision', ['jquery', 'gridster-coords'], factory);
} else {
root.GridsterCollision = factory(root.$ || root.jQuery,
+4 -3
View File
@@ -7,11 +7,12 @@
*/
;(function(root, factory) {
if (typeof define === 'function' && define.amd) {
if (typeof exports === 'object') {
module.exports = factory(require('jquery'));
} else if (typeof define === 'function' && define.amd) {
define('gridster-coords', ['jquery'], factory);
} else {
root.GridsterCoords = factory(root.$ || root.jQuery);
root.GridsterCoords = factory(root.$ || root.jQuery);
}
}(this, function($) {
+3 -2
View File
@@ -7,8 +7,9 @@
*/
;(function(root, factory) {
if (typeof define === 'function' && define.amd) {
if (typeof exports === 'object') {
module.exports = factory(require('jquery'));
} else if (typeof define === 'function' && define.amd) {
define('gridster-draggable', ['jquery'], factory);
} else {
root.GridsterDraggable = factory(root.$ || root.jQuery);
+3 -2
View File
@@ -1,6 +1,7 @@
;(function(root, factory) {
if (typeof define === 'function' && define.amd) {
if (typeof exports === 'object') {
module.exports = factory(require('jquery'), require('./jquery.gridster.js'));
} else if (typeof define === 'function' && define.amd) {
define(['jquery', 'gridster'], factory);
} else {
root.Gridster = factory(root.$ || root.jQuery, root.Gridster);
+5 -2
View File
@@ -7,8 +7,11 @@
*/
;(function(root, factory) {
if (typeof define === 'function' && define.amd) {
if (typeof exports === 'object') {
module.exports = factory(require('jquery'),
require('./jquery.draggable.js'), require('./jquery.collision.js'),
require('./utils.js'));
} else if (typeof define === 'function' && define.amd) {
define(['jquery', 'gridster-draggable', 'gridster-collision'], factory);
} else {
root.Gridster = factory(root.$ || root.jQuery, root.GridsterDraggable,