Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename --temp-directory option to --temp-dir #897

Merged
merged 3 commits into from Aug 27, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -291,7 +291,7 @@ Any configuration options that can be set via the command line can also be speci
],
"cache": true,
"all": true,
"temp-directory": "./alternative-tmp",
"temp-dir": "./alternative-tmp",
"report-dir": "./alternative"
}
}
Expand Down
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -41,7 +41,7 @@ function NYC (config) {
this.config = config

this.subprocessBin = config.subprocessBin || path.resolve(__dirname, './bin/nyc.js')
this._tempDirectory = config.tempDirectory || './.nyc_output'
this._tempDirectory = config.tempDir || './.nyc_output'
this._instrumenterLib = require(config.instrumenter || './lib/instrumenters/istanbul')
this._reportDir = config.reportDir || 'coverage'
this._sourceMap = typeof config.sourceMap === 'boolean' ? config.sourceMap : true
Expand Down
3 changes: 2 additions & 1 deletion lib/commands/merge.js
Expand Up @@ -24,7 +24,8 @@ exports.builder = function (yargs) {
type: 'text',
default: 'coverage.json'
})
.option('temp-directory', {
.option('temp-dir', {
alias: 'temp-directory',
describe: 'directory to read raw coverage information from',
default: './.nyc_output'
})
Expand Down
3 changes: 2 additions & 1 deletion lib/commands/report.js
Expand Up @@ -20,7 +20,8 @@ exports.builder = function (yargs) {
describe: 'directory to output coverage reports in',
default: 'coverage'
})
.option('temp-directory', {
.option('temp-dir', {
alias: 'temp-directory',
describe: 'directory to read raw coverage information from',
default: './.nyc_output'
})
Expand Down
3 changes: 2 additions & 1 deletion lib/config-util.js
Expand Up @@ -222,7 +222,8 @@ Config.buildYargs = function (cwd) {
description: 'specify a different .nycrc path',
global: false
})
.option('temp-directory', {
.option('temp-dir', {
alias: 'temp-directory',
describe: 'directory to output raw coverage information to',
default: './.nyc_output',
global: false
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -11,8 +11,8 @@
"build": "node ./build-tests",
"instrument": "node ./build-self-coverage.js",
"test-integration": "tap -t120 --no-cov -b ./test/build/*.js && mocha --timeout=15000 ./test/nyc-bin.js",
"test-mocha": "node ./bin/nyc --no-clean --silent --temp-directory=./.self_coverage mocha ./test/nyc.js ./test/process-args.js",
"report": "node ./bin/nyc --temp-directory ./.self_coverage/ -r text -r lcov report",
"test-mocha": "node ./bin/nyc --no-clean --silent --temp-dir=./.self_coverage mocha ./test/nyc.js ./test/process-args.js",
"report": "node ./bin/nyc --temp-dir ./.self_coverage/ -r text -r lcov report",
"release": "standard-version"
},
"bin": {
Expand Down