Name: helper-require
Owner: Helpers
Description: Use any node module as a helper in templates. Should work with Handlebars, Lo-Dash, underscore, or any template engine that supports helper functions.
Created: 2015-02-09 04:58:58.0
Updated: 2015-02-09 04:59:19.0
Pushed: 2015-02-09 04:59:12.0
Homepage: null
Size: 108
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Use any node module as a helper in templates. Should work with Handlebars, Lo-Dash, underscore, or any template engine that supports helper functions.
i helper-require --save-dev
helper = require('helper-require');
If you use a .verb.md
, just add the helper to devDependencies
. If you use a verbfile.js
, you can register the helper like this:
.helper('require', require('helper-require'));
sage
%= require('get-value')({a: {b: {c: 'foo'}}}, 'a.b.c') %}
/=> 'foo'
mble.helper('require', require('helper-require'));
sage (pass {a: {b: {c: 'foo'}}} on the context)
{require, 'get-value' this 'a.b.c'}}
/=> 'foo'
Install dev dependencies:
i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Jon Schlinkert
Copyright (c) 2015 Jon Schlinkert
Released under the MIT license
This file was generated by verb on February 08, 2015.