Skip to content

Commit

Permalink
Cleanup and bump version to 0.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
jgarber623 committed Mar 31, 2018
1 parent 03cb3cf commit 3e74c10
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ node_js:
cache:
directories:
- node_modules
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
notifications:
email: false
slack:
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
[![Bower](https://img.shields.io/bower/v/templatetemplate.svg?style=for-the-badge)](https://bower.io/search/?q=templatetemplate)
[![Downloads](https://img.shields.io/npm/dt/@jgarber/templatetemplate.svg?style=for-the-badge)](https://www.npmjs.com/package/@jgarber/templatetemplate)
[![Build](https://img.shields.io/travis/jgarber623/TemplateTemplate.svg?style=for-the-badge)](https://travis-ci.org/jgarber623/TemplateTemplate)
[![Maintainability](https://img.shields.io/codeclimate/maintainability/jgarber623/TemplateTemplate.svg?style=for-the-badge)](https://codeclimate.com/github/jgarber623/TemplateTemplate)
[![Coverage](https://img.shields.io/codeclimate/coverage/jgarber623/TemplateTemplate.svg?style=for-the-badge)](https://codeclimate.com/github/jgarber623/TemplateTemplate)

### Key Features

Expand All @@ -18,15 +20,15 @@ TemplateTemplate is also really tiny:
<tbody>
<tr>
<th>Uncompressed</th>
<td>1,436 bytes</td>
<td>1,452 bytes</td>
</tr>
<tr>
<th>Minified</th>
<td>828 bytes</td>
<td>841 bytes</td>
</tr>
<tr>
<th>Minified and gzipped</th>
<td>486 bytes</td>
<td>494 bytes</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -201,7 +203,7 @@ TemplateTemplate is written and maintained by [Jason Garber](https://sixtwothree

- [CashCash](https://github.com/jgarber623/CashCash), a very small DOM library inspired by jQuery.
- [RadioRadio](https://github.com/jgarber623/RadioRadio), a very small [PubSub](https://en.wikipedia.org/wiki/Publish–subscribe_pattern) library.
- [RouterRouter](https://github.com/jgarber623/RouterRouter), a very small routing library extracted from [Backbone's Router](http://backbonejs.org/docs/backbone.html#section-169).
- [RouterRouter](https://github.com/jgarber623/RouterRouter), a very small routing library extracted from [Backbone's Router](http://backbonejs.org/docs/backbone.html#section-185).

## License

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.1.4",
"version": "0.1.5",
"main": "dist/templatetemplate.js",
"moduleType": [
"globals"
Expand Down
3 changes: 2 additions & 1 deletion dist/templatetemplate.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TemplateTemplate 0.1.4
* TemplateTemplate 0.1.5
*
* A very small JavaScript <template> manipulation library.
*
Expand All @@ -13,6 +13,7 @@
(function(root, factory) {
root.TemplateTemplate = factory(root.document);
})(this, function(document) {
"use strict";
return function(template, insertions) {
template = template instanceof HTMLElement ? template : document.querySelector(template);
if (template === null) {
Expand Down
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 0.1.4
* TemplateTemplate 0.1.5
*
* 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){e.TemplateTemplate=function(e){return function(t,n){if(null===(t=t instanceof HTMLElement?t:e.querySelector(t)))throw new TypeError(t+" is not an HTMLTemplateElement");var r=e.importNode(t.content,!0);return Object.entries(n||{}).forEach(function(e){var t=r.querySelector(e[0]),n=e[1];n instanceof Array&&(Object.entries(n[1]).forEach(function(e){t.setAttribute(e[0],e[1])}),n=n[0]),n instanceof DocumentFragment||n instanceof HTMLElement?t.appendChild(n):t.textContent=n}),r}}(e.document)}(this);
!function(e,t){e.TemplateTemplate=function(e){"use strict";return function(t,n){if(null===(t=t instanceof HTMLElement?t:e.querySelector(t)))throw new TypeError(t+" is not an HTMLTemplateElement");var r=e.importNode(t.content,!0);return Object.entries(n||{}).forEach(function(e){var t=r.querySelector(e[0]),n=e[1];n instanceof Array&&(Object.entries(n[1]).forEach(function(e){t.setAttribute(e[0],e[1])}),n=n[0]),n instanceof DocumentFragment||n instanceof HTMLElement?t.appendChild(n):t.textContent=n}),r}}(e.document)}(this);
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jgarber/templatetemplate",
"version": "0.1.4",
"version": "0.1.5",
"description": "A very small JavaScript <template> manipulation library.",
"keywords": [
"dom",
Expand Down Expand Up @@ -28,7 +28,8 @@
"scripts": {
"build": "./scripts/build.js; ./scripts/stats.js",
"stats": "./scripts/stats.js",
"test": "$(npm bin)/eslint ."
"test": "npm run test:lint",
"test:lint": "$(npm bin)/eslint ."
},
"devDependencies": {
"cli-table": "^0.3.1",
Expand Down
2 changes: 2 additions & 0 deletions src/templatetemplate.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
(function(root, factory) {
root.TemplateTemplate = factory(root.document);
}(this, function(document) {
'use strict';

return function(template, insertions) {
template = template instanceof HTMLElement ? template : document.querySelector(template);

Expand Down

0 comments on commit 3e74c10

Please sign in to comment.