Skip to content

v2.7.1

Compare
Choose a tag to compare
@sethkinast sethkinast released this 30 Apr 20:55
· 68 commits to master since this release

Notable Changes

dust.config.cache

In previous versions, setting dust.config.cache to false would blow away the entire cache on every render. Now, setting it to false just prevents new templates from being added and cached templates from being used. Setting it back to true means that previously-cached templates will be ready to use.

dust.onLoad

We have added a callback(null, compiledTemplate) signature to dust.onLoad.

Calling the onLoad callback with a compiled template function will use this template to satisfy the load request. The template is not automatically registered under any name when passed to the callback, so the onLoad function should handle registration as it needs.

You can still call the callback with uncompiled template source and Dust will compile and store it, while respecting your dust.config.cache setting.

dust.makeBase

dust.makeBase is now aliased to dust.context.

Errata

Dust 2.7.0 broke backwards compatibility with older Dust compilers. This regression has been fixed so templates compiled with older versions of Dust will continue to work with Dust 2.7.1; you can use an older compiler if needed.