tdeekens / grunt-nyc

Grunt task for the nyc code coverage tool.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

grunt-nyc

Build Status ♦️ Dependency Status ♦️ devDependency Statusnpm version

Grunt task for the nyc code coverage tool.

NPM

Getting Started

This plugin requires Grunt ~0.4.2

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

Install node dependency via npm

npm install grunt-nyc --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-nyc');

The "nyc" task

Overview

In your project's Gruntfile, the nyc task is available to use.

You can run grunt nyc standalone Or add it to an existing task: grunt.registerTask('test', ['clean', 'nyc']);

Options

Passing options to nyc's executable.

// cache directory for nyc
tempDirectory: './.nyc_output',
// use any reporters that are supported by istanbul
reporter: 'text',
// modules to require and run through nyc
require: []

Please refer to the readme of nyc on how to exclude files or on how to configure istanbul.

An example configuration can be found here and if you want to check the options you might want to check the Gruntfile itself.

Developing & Contributing

Developing on the task alone is fairly easy just git clone https://github.com/tdeekens/grunt-nyc.git then cd grunt-nyc. From there one has to link the package to itself via npm link && npm link grunt-nyc which will allow for calling grunt dev. Now just work the task/nyc.js and check results - feel free to submit a pull-request!

Release History

  • 0.0.0 Development, do not use!

Acknowledgements

  • ...to great people around me supporting me with ideas and feedback!

About

Grunt task for the nyc code coverage tool.

License:MIT License


Languages

Language:JavaScript 100.0%