Skip to content

A reusable nyc configuration to improve common workflow

License

Notifications You must be signed in to change notification settings

shinnn/nyc-config-common

Repository files navigation

nyc-config-common

npm version Build Status

A reusable nyc configuration to improve common workflow

Installation

Use npm.

npm install --save-dev nyc-config-common

Usage

Include this package to the project's nyc configuration.

{
  "nyc": {
    "extends": "nyc-config-common"
  }
}

Then nyc command uses the better default settings whenever it's run, as described below:

On non-CI environments

  • Runs both html and text reporter in every nyc execution
  • Writes raw coverage information to coverage directory where HTML reports are also saved, instead of the default .nyc_output
    • So that users don't need to include .nyc_output to their .gitignore

On CI

For example Travis CI and AppVeyor

  • Uses text-lcov reporter by default while executing report subcommand
    • In most case nyc report is expected to print LCOV on CI to integrate coverage report services

License

ISC License © 2018 Shinnosuke Watanabe