ist.js v0.5.7 released
06 September 2013 permalinkI just pushed a 0.5.7 release. I've been working quite a bit to prepare version 0.6 (which will mainly enable updating rendered templates), rewriting things many times, and I decided to do another release before 0.6 because of some already useful changes.
On a user's perspective, here is what changed in this version:
- New directives are available.
@dom
enables inserting DOM nodes when rendering:
@dom someNode
template.render({ someNode: document.createElement("div"); });
- You can now create reusable "components" using
@define
and@use
:
@define "article"
.article
h1 "{{ title }}"
"{{ text }}"
@each articles
@use "article"
- Rendering performance has been boosted quite a lot (around 30% faster in my not-scientific-at-all benchmarks). This is actually a quite welcome side effect of rewriting things to enable template updating.
For people defining directive helpers, here is a summary of what changed; please refer to the documentation for more details.
- Directive helper definition has changed a bit to prepare ground for 0.6;
helpers defined before 0.5.7 are incompatible. The two main changes are that
rendered nodes are now to be inserted into a document-fragment passed as a
parameter, and that the outer and inner context objects are now both "real"
parameters (no more using
this
). - The
pushEvalVar
andpopEvalVar
methods on rendering context objects have been deprecated in favor of newpushScope
andpopScope
. They will be removed in version 0.6.
More changes have happened under the hood, see the changelog for more details.