Skip to content

Commit

Permalink
docs: 📝 add docs around adding helpers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Simpson committed Nov 3, 2017
1 parent 80d8c99 commit 9d362cb
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
# Downpour

Sparkbox implementation of [drizzle-builder](https://www.npmjs.com/package/drizzle-builder)
Sparkbox implementation of [drizzle-builder][db]


## Usage

Downpour exposes the [drizzle-builder][db] as a function to compile handlebars templates into HTML.

All [drizzle-builder options](https://github.com/cloudfour/drizzle-builder#options) are valid.

Downpour includes a few handlebars helpers by default:

- all [@cloudfour/hbs-helpers](https://github.com/cloudfour/core-hbs-helpers/tree/master/lib)
- [ifProd](https://github.com/sparkbox/ifProd-helper)
- [is][assemble]
- [isn't][assemble]
- [split][assemble]

To add additional helpers create a `helpers` key in the options object like so:

``` javascript
const downpour = require('downpour');
const { myHelperFunc } = require('my-helper-package');

const opts = {
helpers: {
myHelper: myHelperFunc,
},
};

downpour(opts, cb);

```


[db]: https://www.npmjs.com/package/drizzle-builder
[assemble]: https://github.com/helpers/handlebars-helpers
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sparkbox/downpour",
"version": "0.0.9",
"version": "0.0.10",
"description": "Sparkbox implementation of drizzle-builder",
"engines": {
"node": ">=6.9.1"
Expand Down

0 comments on commit 9d362cb

Please sign in to comment.