helper-lookup-deps
v0.2.2
Published
Collection of template helpers for the methods in lookup-deps.
Downloads
12
Readme
helper-lookup-deps
Collection of template helpers for the methods in lookup-deps.
Install with npm
npm i helper-lookup-deps --save
Example usage
Handlebars:
var lookup = require('helper-lookup-deps');
Handlebars
Register the helper:
var lookup = require('helper-lookup-deps');
handlebars.registerHelper('links', lookup.links);
Use the helper;
<!-- generate links to all related projects -->
{{links}}
<!-- pass an array on the context to generate
links to only specified projects -->
{{links links}}
Template, Verb, or Assemble
Replace
app
with whatever you're using
Register the helper:
var lookup = require('helper-lookup-deps');
app.helper('links', lookup.links);
Use the helper
// links to all related projects
{%= links() %}
// links to only specified projects
{%= links(['arr-diff']) %}
Running tests
Install dev dependencies:
npm i -d && npm test
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
To request or contribute a helper to the github.com/helpers org, please read this contributing guide first.
Author
Jon Schlinkert
License
Copyright (c) 2015 Jon Schlinkert
Released under the MIT license
This file was generated by verb-cli on February 26, 2015.