aboutsummaryrefslogtreecommitdiff
path: root/node_modules/nyc/lib/config-util.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-08-14 05:01:11 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-08-14 05:02:09 +0200
commit363723fc84f7b8477592e0105aeb331ec9a017af (patch)
tree29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/nyc/lib/config-util.js
parent5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff)
node_modules
Diffstat (limited to 'node_modules/nyc/lib/config-util.js')
-rw-r--r--node_modules/nyc/lib/config-util.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/node_modules/nyc/lib/config-util.js b/node_modules/nyc/lib/config-util.js
index 62d057a3f..e355d8720 100644
--- a/node_modules/nyc/lib/config-util.js
+++ b/node_modules/nyc/lib/config-util.js
@@ -14,7 +14,7 @@ var Config = {}
Config.loadConfig = function (argv, cwd) {
cwd = cwd || process.env.NYC_CWD || process.cwd()
var pkgPath = findUp.sync('package.json', {cwd: cwd})
- var rcPath = findUp.sync('.nycrc', {cwd: cwd})
+ var rcPath = findUp.sync(['.nycrc', '.nycrc.json'], {cwd: cwd})
var rcConfig = null
if (rcPath) {
@@ -93,6 +93,10 @@ Config.buildYargs = function (cwd) {
default: 0,
description: 'what % of statements must be covered?'
})
+ .option('per-file', {
+ default: false,
+ description: 'check thresholds per file'
+ })
.example('$0 check-coverage --lines 95', "check whether the JSON in nyc's output folder meets the thresholds provided")
})
.option('reporter', {
@@ -195,6 +199,12 @@ Config.buildYargs = function (cwd) {
description: 'should nyc detect and handle source maps?',
global: false
})
+ .option('per-file', {
+ default: false,
+ type: 'boolean',
+ description: 'check thresholds per file',
+ global: false
+ })
.option('produce-source-map', {
default: false,
type: 'boolean',
@@ -234,7 +244,7 @@ Config.buildYargs = function (cwd) {
.example('$0 npm test', 'instrument your tests with coverage')
.example('$0 --require babel-core/register npm test', 'instrument your tests with coverage and babel')
.example('$0 report --reporter=text-lcov', 'output lcov report after running your tests')
- .epilog('visit https://git.io/voHar for list of available reporters')
+ .epilog('visit https://git.io/vHysA for list of available reporters')
.boolean('help')
.boolean('h')
.boolean('version')