Made compatible with different module loaders
This commit is contained in:
parent
c31a3a902b
commit
f8eb0e9bde
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "tile-flooring",
|
"name": "tile-flooring",
|
||||||
"version": "0.0.2",
|
"version": "0.0.3",
|
||||||
"homepage": "https://terribleplan.com/TileFlooring.js/",
|
"homepage": "https://terribleplan.com/TileFlooring.js/",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Kegan Myers <kegan@keganmyers.com>"
|
"Kegan Myers <kegan@keganmyers.com>"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "tile-flooring",
|
"name": "tile-flooring",
|
||||||
"version": "0.0.2",
|
"version": "0.0.3",
|
||||||
"description": "TileFlooring.js - You want a masonry-style layout? You got it.",
|
"description": "TileFlooring.js - You want a masonry-style layout? You got it.",
|
||||||
"main": "tile.js",
|
"main": "tile.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
18
tile.js
18
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) {
|
function elementSuicide(element) {
|
||||||
if (element.parentElement !== null) {
|
if (element.parentElement !== null) {
|
||||||
element.parentElement.removeChild(element);
|
element.parentElement.removeChild(element);
|
||||||
|
@ -131,4 +143,4 @@ var TileFloor = (function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
return Tile;
|
return Tile;
|
||||||
})();
|
});
|
Loading…
Reference in a new issue