.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.5.
.TH NYC.JS "1" "January 2022" "nyc.js 15.1.0" "User Commands"
.SH NAME
nyc.js \- istanbul command line interface
.SH DESCRIPTION
nyc.js [command] [options]
nyc.js [options] [bin\-to\-instrument]
.SS "Commands:"
.TP
nyc.js check\-coverage
check whether coverage is within
thresholds provided
.TP
nyc.js instrument [output]
instruments a file or a directory
tree and writes the instrumented
code to the desired output location
.TP
nyc.js report
run coverage report for .nyc_output
.TP
nyc.js merge
merge istanbul format coverage
.TP
[output\-file]
output in a given folder
.SH OPTIONS
.TP
\fB\-\-cwd\fR
working directory used when resolving paths
[string] [default: "."]
.TP
\fB\-\-nycrc\-path\fR
specify an explicit path to find nyc
configuration
.TP
\fB\-t\fR, \fB\-\-temp\-dir\fR
directory to output raw coverage information
to [string] [default: "./.nyc_output"]
.TP
\fB\-x\fR, \fB\-\-exclude\fR
a list of specific files and directories that
should be excluded from coverage, glob
patterns are supported [string] [default:
.IP
["coverage/**","packages/*/test{,s}/**","**/*.d.ts","test{,s}/**","test{,\-*}.{
js,cjs,mjs,ts,tsx,jsx}","**/*{.,\-}test.{js,cjs,mjs,ts,tsx,jsx}","**/__tests__/
**","**/{ava,babel,nyc}.config.{js,cjs,mjs}","**/jest.config.{js,cjs,mjs,ts}",
.IP
"**/{karma,rollup,webpack}.config.js","**/.{eslint,mocha}rc.{js,cjs}"]]
.TP
\fB\-\-exclude\-node\-modules\fR
whether or not to exclude all node_module
folders (i.e. **/node_modules/**) by default
.IP
[boolean] [default: true]
.TP
\fB\-n\fR, \fB\-\-include\fR
a list of specific files that should be
covered, glob patterns are supported
.IP
[string] [default: []]
.TP
\fB\-e\fR, \fB\-\-extension\fR
a list of extensions that nyc should handle in
addition to .js
.IP
[string] [default: [".js",".cjs",".mjs",".ts",".tsx",".jsx"]]
.TP
\fB\-\-ignore\-class\-methods\fR
class method names to ignore for coverage
[string] [default: []]
.TP
\fB\-\-auto\-wrap\fR
allow `return` statements outside of functions
[boolean] [default: true]
.TP
\fB\-\-es\-modules\fR
should files be treated as ES Modules
[boolean] [default: true]
.TP
\fB\-\-parser\-plugins\fR
babel parser plugins to use when parsing the
source
.IP
[string] [default: ["asyncGenerators","bigInt","classProperties","classPrivate
Properties","classPrivateMethods","dynamicImport","importMeta","numericSeparat
.IP
or","objectRestSpread","optionalCatchBinding","topLevelAwait"]]
.TP
\fB\-\-compact\fR
should the output be compacted?
[boolean] [default: true]
.TP
\fB\-\-preserve\-comments\fR
should comments be preserved in the output?
[boolean] [default: true]
.TP
\fB\-\-produce\-source\-map\fR
should source maps be produced?
[boolean] [default: true]
.TP
\fB\-\-source\-map\fR
should nyc detect and handle source maps?
[boolean] [default: true]
.TP
\fB\-i\fR, \fB\-\-require\fR
a list of additional modules that nyc should
attempt to require in its subprocess, e.g.,
@babel/register, @babel/polyfill
.IP
[string] [default: []]
.TP
\fB\-\-instrument\fR
should nyc handle instrumentation?
[boolean] [default: true]
.TP
\fB\-\-exclude\-after\-remap\fR
should exclude logic be performed after the
source\-map remaps filenames?
.IP
[boolean] [default: true]
.TP
\fB\-\-branches\fR
what % of branches must be covered?
[number] [default: 0]
.TP
\fB\-\-functions\fR
what % of functions must be covered?
[number] [default: 0]
.TP
\fB\-\-lines\fR
what % of lines must be covered?
[number] [default: 90]
.TP
\fB\-\-statements\fR
what % of statements must be covered?
[number] [default: 0]
.TP
\fB\-\-per\-file\fR
check thresholds per file
[boolean] [default: false]
.TP
\fB\-\-check\-coverage\fR
check whether coverage is within thresholds
provided [boolean] [default: false]
.TP
\fB\-r\fR, \fB\-\-reporter\fR
coverage reporter(s) to use
[string] [default: ["text"]]
.TP
\fB\-\-report\-dir\fR
directory to output coverage reports in
[string] [default: "coverage"]
.TP
\fB\-\-show\-process\-tree\fR
display the tree of spawned processes
[boolean] [default: false]
.TP
\fB\-\-skip\-empty\fR
don't show empty files (no lines of code) in
report [boolean] [default: false]
.TP
\fB\-\-skip\-full\fR
don't show files with 100% statement, branch,
and function coverage
.IP
[boolean] [default: false]
.TP
\fB\-s\fR, \fB\-\-silent\fR
don't output a report after tests finish
running [boolean] [default: false]
.TP
\fB\-a\fR, \fB\-\-all\fR
whether or not to instrument all files of the
project (not just the ones touched by your
test suite) [boolean] [default: false]
.TP
\fB\-\-eager\fR
instantiate the instrumenter at startup (see
https://git.io/vMKZ9)
.IP
[boolean] [default: false]
.TP
\fB\-c\fR, \fB\-\-cache\fR
cache instrumentation results for improved
performance [boolean] [default: true]
.TP
\fB\-\-cache\-dir\fR
explicitly set location for instrumentation
cache [string]
.TP
\fB\-\-babel\-cache\fR
cache babel transpilation results for improved
performance [boolean] [default: false]
.TP
\fB\-\-use\-spawn\-wrap\fR
use spawn\-wrap instead of setting
process.env.NODE_OPTIONS
.IP
[boolean] [default: false]
.TP
\fB\-\-hook\-require\fR
should nyc wrap require?
[boolean] [default: true]
.TP
\fB\-\-hook\-run\-in\-context\fR
should nyc wrap vm.runInContext?
[boolean] [default: false]
.TP
\fB\-\-hook\-run\-in\-this\-context\fR
should nyc wrap vm.runInThisContext?
[boolean] [default: false]
.TP
\fB\-\-clean\fR
should the .nyc_output folder be cleaned
before executing tests
.IP
[boolean] [default: true]
.TP
\fB\-h\fR, \fB\-\-help\fR
Show help [boolean]
.TP
\fB\-\-version\fR
Show version number [boolean]
.SH EXAMPLES
.TP
nyc.js npm test
instrument your tests with coverage
.TP
nyc.js \-\-require @babel/register npm
instrument your tests with coverage
.TP
test
and transpile with Babel
.TP
nyc.js report \-\-reporter=text\-lcov
output lcov report after running
your tests
.PP
visit https://git.io/vHysA for list of available reporters