Skip to content

v0.2.0

Compare
Choose a tag to compare
@nporteschaikin nporteschaikin released this 24 Mar 16:25
· 164 commits to master since this release

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 or init.coffee
  • Pass a config.json or config.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 now beforeRender

  • Hooks are now passed a Utils instance (see README) and, on all hooks except before, 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.