var coverage = require('{%= name %}');
// specify the file to include (generated by istanbul)
coverage('coverage/summary.txt');
- See fixtures/expected.txt for a full example of the rendered result.
- See a live example on the template-helpers readme (generated by [verb][])
[Handlebars]
Register and use the helper with [handlebars][]:
var handlebars = require('handlebars');
handlebars.registerHelper('coverage', require('{%= name %}'));
handlebars.compile('{{coverage "coverage/summary.txt"}}')();
[Verb][]
Register and use the helper with [verb][]
var verb = require('verb');
verb.helper('coverage', require('{%= name %}'));
verb.render('{%= coverage("coverage/summary.txt") %}');
Use the helper with one of these great projects:
{%= related(['verb', 'assemble', 'templates', 'update', 'generate']) %}
Register the helper with your engine of choice:
{%= related(['handlebars', 'lodash', 'engine-lodash', 'engine-base', 'engine-handlebars']) %}
Or any other engine that has support for helper functions.