diff --git a/package.json b/package.json index c33f26e..b16d96c 100644 --- a/package.json +++ b/package.json @@ -77,14 +77,14 @@ "build:types": "exec-if-updated --source package.json --source tsconfig.json --source \"tsconfig/**\" --source \"rollup.*.config.js\" --source \"src/**\" --target build/.targets/build-types.succeeded \"run-s -n rebuild:types\"", "# clean # remove build artifacts": "", "clean": "shx rm -fr build dist", - "# coverage # calculate and display (or send) code coverage [alias: 'cov']": "", + "# coverage # calculate and display code coverage [alias: 'cov']": "", "coverage": "run-s --silent +:max-node-8 && shx echo \"[coverage] WARN Code coverage skipped [for NodeJS < v10]\" 1>&2 || run-s \"+:coverage\"", "cov": "run-s coverage", "cov:html": "nyc report --reporter=html --report-dir=.coverage", - "#* cov:send # use `--cov-send=...` to pass options to coverage uploader": "", - "cov:send": "shx mkdir -p .coverage && nyc report --reporter=text-lcov > \".coverage/@coverage.lcov\" && cross-env-shell codecov --disable=gcov --file=\".coverage/@coverage.lcov\" $npm_config_cov_send", - "cov:text": "nyc report", - "cov:view": "run-s cov:html && cd .coverage && open-cli index.html", + "cov:lcov": "shx mkdir -p .coverage && nyc report --reporter=text-lcov > \".coverage/@coverage.lcov\" ", + "cov:text": "shx mkdir -p .coverage && nyc report --color=always > \".coverage/@coverage.txt\" ", + "cov:view:html": "run-s --silent cov:html && cd .coverage && open-cli index.html", + "cov:view:text": "run-s --silent cov:text && shx cat \".coverage/@coverage.txt\" ", "dist": "run-s update", "# fix # fix package issues (automated/non-interactive)": "", "fix": "run-s fix:*", @@ -147,7 +147,7 @@ "# verify # fully (and verbosely) test package": "", "verify": "cross-env npm_config_test_dist=true npm_config_test=--verbose run-s test", "## +:... == sub-scripts (may run 'visibly', but not user-facing)": "", - "+:coverage": "run-s build test:code && ( is-ci && run-s cov:send ) || ( run-s --silent _:is-not-ci && run-s cov:view )", + "+:coverage": "exec-if-updated --source package.json --source tsconfig.json --source \"tsconfig/**\" --source \"rollup.*.config.js\" --source \"src/**\" --target .nyc_output/processinfo/index.json \"run-s --silent build test:code\" && ( is-ci && run-s cov:view:text || run-s cov:view:html )", "+:max-node-8": "is-node-not-modern 10", "+:min-node-10": "is-node-modern 10", "## _:... == sub-scripts ('hidden'; generally should be run 'silently' using `run-s/run-p --silent ...`": "",