Skip to content

Commit

Permalink
Rebuild and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
jgarber623 committed Sep 24, 2019
1 parent a8dda7b commit 1180887
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ TemplateTemplate is also really tiny:

| Format | File Size | Minfied Size | Gzipped Size |
|:-----------------------|:------------|:-------------|:-------------|
| Uncompressed (module) | 1,502 bytes | 607 bytes | 335 bytes |
| Uncompressed (browser) | 1,842 bytes | 766 bytes | 403 bytes |
| Minified (browser) | 1,084 bytes | 766 bytes | 403 bytes |
| Uncompressed (module) | 1,506 bytes | 607 bytes | 335 bytes |
| Uncompressed (browser) | 1,848 bytes | 766 bytes | 403 bytes |
| Minified (browser) | 1,090 bytes | 766 bytes | 403 bytes |

## Getting TemplateTemplate

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "templatetemplate",
"description": "A very small JavaScript <template> manipulation library.",
"version": "0.3.1",
"version": "0.3.2",
"main": "dist/templatetemplate.js",
"moduleType": [
"globals",
Expand Down
10 changes: 5 additions & 5 deletions dist/templatetemplate.es.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TemplateTemplate v0.3.1
* TemplateTemplate v0.3.2
*
* A very small JavaScript <template> manipulation library.
*
Expand All @@ -20,20 +20,20 @@ function TemplateTemplate(template, insertions) {
throw new TypeError(insertions + " is not an Object");
}
var importedNode = document.importNode(template.content, true);
Object.entries(insertions).forEach(function(insertionArray) {
Object.entries(insertions).forEach((function(insertionArray) {
var currentNode = importedNode.querySelector(insertionArray[0]), insertionValue = insertionArray[1];
if (insertionValue instanceof Array) {
Object.entries(insertionValue[1]).forEach(function(attributesArray) {
Object.entries(insertionValue[1]).forEach((function(attributesArray) {
currentNode.setAttribute(attributesArray[0], attributesArray[1]);
});
}));
insertionValue = insertionValue[0];
}
if (insertionValue instanceof DocumentFragment || insertionValue instanceof HTMLElement) {
currentNode.appendChild(insertionValue);
} else {
currentNode.textContent = insertionValue;
}
});
}));
return importedNode;
}

Expand Down
14 changes: 7 additions & 7 deletions dist/templatetemplate.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TemplateTemplate v0.3.1
* TemplateTemplate v0.3.2
*
* A very small JavaScript <template> manipulation library.
*
Expand All @@ -13,7 +13,7 @@
(function(global, factory) {
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global = global || self,
global.TemplateTemplate = factory());
})(this, function() {
})(this, (function() {
"use strict";
function TemplateTemplate(template, insertions) {
template = template instanceof HTMLElement ? template : document.querySelector(template);
Expand All @@ -25,21 +25,21 @@
throw new TypeError(insertions + " is not an Object");
}
var importedNode = document.importNode(template.content, true);
Object.entries(insertions).forEach(function(insertionArray) {
Object.entries(insertions).forEach((function(insertionArray) {
var currentNode = importedNode.querySelector(insertionArray[0]), insertionValue = insertionArray[1];
if (insertionValue instanceof Array) {
Object.entries(insertionValue[1]).forEach(function(attributesArray) {
Object.entries(insertionValue[1]).forEach((function(attributesArray) {
currentNode.setAttribute(attributesArray[0], attributesArray[1]);
});
}));
insertionValue = insertionValue[0];
}
if (insertionValue instanceof DocumentFragment || insertionValue instanceof HTMLElement) {
currentNode.appendChild(insertionValue);
} else {
currentNode.textContent = insertionValue;
}
});
}));
return importedNode;
}
return TemplateTemplate;
});
}));
4 changes: 2 additions & 2 deletions dist/templatetemplate.min.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TemplateTemplate v0.3.1
* TemplateTemplate v0.3.2
*
* A very small JavaScript <template> manipulation library.
*
Expand All @@ -10,4 +10,4 @@
* TemplateTemplate may be freely distributed under the MIT license.
*/

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).TemplateTemplate=t()}(this,function(){"use strict";return function(e,t){if(t=t||{},null===(e=e instanceof HTMLElement?e:document.querySelector(e))||!(e instanceof HTMLTemplateElement))throw new TypeError(e+" is not an HTMLTemplateElement");if("object"!=typeof t)throw new TypeError(t+" is not an Object");var n=document.importNode(e.content,!0);return Object.entries(t).forEach(function(e){var t=n.querySelector(e[0]),o=e[1];o instanceof Array&&(Object.entries(o[1]).forEach(function(e){t.setAttribute(e[0],e[1])}),o=o[0]),o instanceof DocumentFragment||o instanceof HTMLElement?t.appendChild(o):t.textContent=o}),n}});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).TemplateTemplate=t()}(this,(function(){"use strict";return function(e,t){if(t=t||{},null===(e=e instanceof HTMLElement?e:document.querySelector(e))||!(e instanceof HTMLTemplateElement))throw new TypeError(e+" is not an HTMLTemplateElement");if("object"!=typeof t)throw new TypeError(t+" is not an Object");var n=document.importNode(e.content,!0);return Object.entries(t).forEach((function(e){var t=n.querySelector(e[0]),o=e[1];o instanceof Array&&(Object.entries(o[1]).forEach((function(e){t.setAttribute(e[0],e[1])})),o=o[0]),o instanceof DocumentFragment||o instanceof HTMLElement?t.appendChild(o):t.textContent=o})),n}}));
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jgarber/templatetemplate",
"version": "0.3.1",
"version": "0.3.2",
"description": "A very small JavaScript <template> manipulation library.",
"keywords": [
"dom",
Expand Down

0 comments on commit 1180887

Please sign in to comment.