v0.2.0
A thorough refactor; intended to make API more independent and develop a more comprehensive test suite.
Overall:
- now exports a
Sproutconstructor, which can be passed any path as a base Sprout path. - includes a
Templateconstructor which manages individual templates. - more encompassing test suite.
- written in vanilla JavaScript.
New features:
- Verbose mode in CLI by passing
-vor--verbose. - Init file can either be
init.jsorinit.coffee - Pass a
config.jsonorconfig.ymlfile to CLI or API to predefine a large set of values.
Notes on moving templates from <0.2:
-
The
before_renderhook is nowbeforeRender -
Hooks are now passed a
Utilsinstance (see README) and, on all hooks exceptbefore, the init config:exports.before = function (utils) {} exports.beforeRender = function (utils, config) {} exports.after = function (utils, config) {}
-
Utilshas been cleaned up significantly (see README). -
The configuration is no longer automatically merged into
Utils; sending the configuration is optional.