Socket
Socket
Sign inDemoInstall

helper-coverage

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

helper-coverage - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

7

package.json
{
"name": "helper-coverage",
"description": "Template helper for including a code coverage report generaged by istanbul.",
"version": "0.1.0",
"description": "Template helper for including a code coverage report generated by istanbul.",
"version": "0.1.1",
"homepage": "https://github.com/jonschlinkert/helper-coverage",

@@ -35,2 +35,3 @@ "author": {

"devDependencies": {
"handlebars": "^3.0.1",
"mocha": "*",

@@ -55,2 +56,2 @@ "should": "*"

]
}
}
# helper-coverage [![NPM version](https://badge.fury.io/js/helper-coverage.svg)](http://badge.fury.io/js/helper-coverage)
> Template helper for including a code coverage report generaged by istanbul.
> Template helper for including a code coverage report generated by istanbul.

@@ -14,13 +14,52 @@ ## Install with [npm](npmjs.org)

```js
var helperCoverage = require('helper-coverage');
var coverage = require('helper-coverage');
// specify the file to include (generated by istanbul)
coverage('coverage/summary.txt');
```
## API
<!-- add a path or glob pattern for files with code comments to use for docs -->
{%= apidocs("index.js") %}
### Live examples
* See [fixtures/expected.txt](./fixtures/expected.txt) for a full example of the rendered result.
* See a live example on the [template-helpers readme](https://github.com/jonschlinkert/template-helpers#code-coverage) (generated by [verb])
## Registering the helper
**[Handlebars]**
Register and use the helper with [handlebars]:
```js
var handlebars = require('handlebars');
handlebars.registerHelper('coverage', require('helper-coverage'));
handlebars.compile('{{coverage "coverage/summary.txt"}}')();
```
**[Verb]**
Register and use the helper with [verb]
```js
var verb = require('verb');
verb.helper('coverage', require('helper-coverage'));
verb.render('{%= coverage("coverage/summary.txt") %}');
```
## Related projects
<!-- add an array of related projects, then un-escape the helper -->
{%= related([]) %}
Use the helper with one of these great projects:
* [verb](https://github.com/assemble/verb): Verb makes it dead simple to generate markdown documentation, using simple templates, with zero configuration required. A project without documentation is like a project that doesn't exist.
* [assemble](http://assemble.io): Static site generator for Grunt.js, Yeoman and Node.js. Used by Zurb Foundation, Zurb Ink, H5BP/Effeckt, Less.js / lesscss.org, Topcoat, Web Experience Toolkit, and hundreds of other projects to build sites, themes, components, documentation, blogs and gh
* [template](https://github.com/jonschlinkert/template): Render templates from any engine. Make custom template types, use layouts on pages, partials or any custom template type, custom delimiters, helpers, middleware, routes, loaders, and lots more. Powers Assemble v0.6.0, Verb v0.3.0 and your application.
Register the helper with your engine of choice:
* [handlebars](http://www.handlebarsjs.com/): Handlebars provides the power necessary to let you build semantic templates effectively with no frustration
* [lodash](https://lodash.com/): The modern build of lodash modular utilities.
* [engine-lodash](https://github.com/jonschlinkert/engine-lodash): Lo-Dash engine, consolidate.js style but with enhancements. Works with Assemble, express.js, engine-cache or any application that follows consolidate.js conventions.
* [engine-handlebars](https://github.com/jonschlinkert/engine-handlebars): Handlebars engine, consolidate.js style but with enhancements. This works with Assemble, express.js, engine-cache or any application that follows consolidate.js conventions.
Or any other engine that has support for helper functions.
## Running tests

@@ -50,1 +89,11 @@ Install dev dependencies:

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on April 19, 2015._
<!-- generated reference links -->
[verb]: https://github.com/assemble/verb
[assemble]: http://assemble.io
[template]: https://github.com/jonschlinkert/template
[handlebars]: http://www.handlebarsjs.com/
[lodash]: https://lodash.com/
[engine-lodash]: https://github.com/jonschlinkert/engine-lodash
[engine-handlebars]: https://github.com/jonschlinkert/engine-handlebars
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc