From 3457524446ded8adc62e43d10fa116a2f34d1974 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Fri, 2 Mar 2018 12:16:18 +0100 Subject: [PATCH] 1.2.0 --- CHANGELOG.md | 35 +++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e59cbd..c53ad6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,41 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## 1.2.0 + + * Add ability to append or prepend to attributes (https://github.com/stackhtml/hstream/commit/e9b71c39d5a08d27b2ee09ae3043abcecd57b3db) + + ```js + hstream({ + '#app': { + class: { prepend: 'beep ', append: ' boop' } + } + }) + ``` + + * Remove attributes by setting `attrName: null` (https://github.com/stackhtml/hstream/commit/32480ba33327b1f32b16a91dc6752b4ecb5b8cec) + * Edit attributes by passing a function (https://github.com/stackhtml/hstream/commit/32480ba33327b1f32b16a91dc6752b4ecb5b8cec) + + ```js + hstream({ + '#app': { + title: function (prev) { return prev.toUpperCase() } + } + }) + ``` + + * Edit html contents by passing a function (https://github.com/stackhtml/hstream/commit/b562c5ff1a644893093dda1c99558dded71fb422) + + ```js + hstream({ + 'code': { + _html: function (source) { + return highlightHTML(source) + } + } + }) + ``` + ## 1.1.0 * Add `_replaceHtml` option that replaces the outer html of an element diff --git a/package.json b/package.json index 5ecd2d9..5370ccc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "hstream", "description": "streaming html templates", - "version": "1.1.0", + "version": "1.2.0", "author": "Renée Kooi ", "bugs": { "url": "https://github.com/stackhtml/hstream/issues"