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