Skip to content

Commit

Permalink
minor fixups / filename changes
Browse files Browse the repository at this point in the history
rename instrument-index to build-self-coverage (more accurate description)

add leading `.` to self_coverage output directory

minor fixups to npm scripts
  • Loading branch information
jamestalmage committed Dec 12, 2015
1 parent ad20f59 commit d4cd456
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ coverage
node_modules
!node_modules/spawn-wrap
test/built-*
self_coverage
.self_coverage
*.covered.js
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/self-coverage-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ onExit(function () {
if (typeof ___nyc_self_coverage___ === 'object') coverage = ___nyc_self_coverage___
if (!coverage) return

var selfCoverageDir = path.join(__dirname, '../self_coverage')
var selfCoverageDir = path.join(__dirname, '../.self_coverage')
mkdirp.sync(selfCoverageDir)
fs.writeFileSync(
path.join(selfCoverageDir, process.pid + '.json'),
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"description": "a code coverage tool that works well with subprocesses.",
"main": "index.js",
"scripts": {
"clean": "rm -rf ./.nyc_output && rm -rf ./test/fixtures/.nyc_output && rm -f ./index.covered.js ./lib/source-map-cache.covered.js && rm -rf ./self_coverage",
"build": "node ./build-tests",
"pretest": "standard",
"test": "npm run cover",
"cover": "npm run clean && npm run build && npm run instrument && npm run run-tests && npm run report",
"dev": "npm run clean && npm run build && npm run run-tests",
"instrument": "node ./instrument-index.js",
"clean": "rm -rf ./.nyc_output ./.self_coverage ./test/fixtures/.nyc_output && rm -f *covered.js ./lib/*covered.js test/built-*.js",
"build": "node ./build-tests",
"instrument": "node ./build-self-coverage.js",
"run-tests": "tap -b ./test/built-*.js ./test/source-map-cache.js",
"report": "istanbul report --include=self_coverage/*.json lcov text",
"run-tests": "tap -b ./test/built-*.js ./test/source-map-cache.js"
"cover": "npm run clean && npm run build && npm run instrument && npm run run-tests && npm run report",
"dev": "npm run clean && npm run build && npm run run-tests"
},
"bin": {
"nyc": "./bin/nyc.js"
Expand Down

0 comments on commit d4cd456

Please sign in to comment.