Made compatible with different module loaders

This commit is contained in:
Jonathan Fielding 2015-07-31 12:13:29 +01:00
parent c31a3a902b
commit f8eb0e9bde
3 changed files with 17 additions and 5 deletions

View file

@ -1,6 +1,6 @@
{
"name": "tile-flooring",
"version": "0.0.2",
"version": "0.0.3",
"homepage": "https://terribleplan.com/TileFlooring.js/",
"authors": [
"Kegan Myers <kegan@keganmyers.com>"

View file

@ -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": {

18
tile.js
View file

@ -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;
})();
});