Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register Handlebars helper through grunt task. #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ Default value: `true`

Include files without DSS annotations.

#### options-handlebar_helpers

Type: `Object`
Default value: `{}`

An object filled with key value pairs of handlebars helpers. The key is the helber name and the value is the callback function. See the [Handlebar documentation](http://handlebarsjs.com/#helpers) for more information.

### Example initConfig

```javascript
Expand Down
5 changes: 5 additions & 0 deletions tasks/dss.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ module.exports = function(grunt){
dss.parser(key, options.parsers[key]);
}

// Handelbars helpers
for( helper in options.handlebars_helpers ) {
handlebars.registerHelper( helper, options.handlebars_helpers[helper] );
}

// Build Documentation
this.files.forEach(function(f){

Expand Down