From f8eb0e9bdea96773fa92e9b459a721f58fe869e0 Mon Sep 17 00:00:00 2001 From: Jonathan Fielding Date: Fri, 31 Jul 2015 12:13:29 +0100 Subject: [PATCH] Made compatible with different module loaders --- bower.json | 2 +- package.json | 2 +- tile.js | 18 +++++++++++++++--- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/bower.json b/bower.json index a0d29ca..932ed77 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "tile-flooring", - "version": "0.0.2", + "version": "0.0.3", "homepage": "https://terribleplan.com/TileFlooring.js/", "authors": [ "Kegan Myers " diff --git a/package.json b/package.json index ac6f3e0..51a5072 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tile-flooring", - "version": "0.0.2", + "version": "0.0.3", "description": "TileFlooring.js - You want a masonry-style layout? You got it.", "main": "tile.js", "scripts": { diff --git a/tile.js b/tile.js index 7f5b9ff..ebc121a 100644 --- a/tile.js +++ b/tile.js @@ -1,6 +1,18 @@ -/*! TileFlooring.js 0.0.1 | (c) 2015 Kegan Myers | https://terribleplan.com/TileFlooring.js/LICENSE.md */ +/*! TileFlooring.js 0.0.3 | (c) 2015 Kegan Myers | https://terribleplan.com/TileFlooring.js/LICENSE.md */ -var TileFloor = (function() { +(function (window, document, undefined, factory) { + if (typeof define === 'function' && define.amd) { + define(function() { + return factory(window, document, undefined); + }); + } + else if (typeof exports === 'object') { + module.exports = factory; + } + else { + window.TileFloor = factory(window, document, undefined); + } +})(window, document, undefined, function (window, document, undefined) { function elementSuicide(element) { if (element.parentElement !== null) { element.parentElement.removeChild(element); @@ -131,4 +143,4 @@ var TileFloor = (function() { }; return Tile; -})(); \ No newline at end of file +}); \ No newline at end of file