A reusable nyc configuration to improve common workflow
npm install --save-dev nyc-config-common
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
andtext
reporter in everynyc
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
- So that users don't need to include
For example Travis CI and AppVeyor
- Uses
text-lcov
reporter by default while executingreport
subcommand
ISC License © 2018 Shinnosuke Watanabe