Skip to content

Commit

Permalink
docs: update with latest resources
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcanessa committed Dec 20, 2021
1 parent bddef6f commit 0d34a16
Show file tree
Hide file tree
Showing 18 changed files with 470 additions and 165 deletions.
101 changes: 101 additions & 0 deletions docs/files/package.json.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@

<!DOCTYPE html>
<html>
<head>
<title>package.json</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/semantic.min.css" type="text/css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/codemirror.min.js" type="text/javascript" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/mode/javascript/javascript.min.js" type="text/javascript" charset="utf-8"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/codemirror.min.css" type="text/css" rel="stylesheet">
<script src="../assets/source-file.js" type="text/javascript" charset="utf-8"></script>
<link href="../assets/source-file.css" type="text/css" rel="stylesheet">
</head>
<body>
<div style="margin-top:3em" class="ui container"><h1 class="ui header"><a href="../index.html">TypeScript coverage report</a></h1><table style="margin-top:2em" class="ui celled table"><thead class=""><tr class=""><th class="">Filename</th><th class="">Percent</th><th class="">Threshold</th><th class="">Total</th><th class="">Covered</th><th class="">Uncovered</th></tr></thead><tbody class=""><tr class="positive"><td class="">package.json</td><td class="">100.00%</td><td class="">90%</td><td class="">0</td><td class="">0</td><td class="">0</td></tr></tbody></table><textarea id="editor" readonly="" style="margin-top:3em">{
&quot;name&quot;: &quot;typescript-coverage-report&quot;,
&quot;version&quot;: &quot;0.6.1&quot;,
&quot;description&quot;: &quot;Node command tool to generate TypeScript coverage report.&quot;,
&quot;main&quot;: &quot;dist/lib/index.js&quot;,
&quot;bin&quot;: {
&quot;typescript-coverage-report&quot;: &quot;dist/bin/typescript-coverage-report.js&quot;
},
&quot;repository&quot;: &quot;[email protected]:alexcanessa/typescript-coverage-report.git&quot;,
&quot;author&quot;: &quot;Alex Canessa &lt;[email protected]&gt;&quot;,
&quot;license&quot;: &quot;MIT&quot;,
&quot;private&quot;: false,
&quot;dependencies&quot;: {
&quot;colors&quot;: &quot;^1.4.0&quot;,
&quot;commander&quot;: &quot;^5.0.0&quot;,
&quot;ncp&quot;: &quot;^2.0.0&quot;,
&quot;react&quot;: &quot;^16.13.1&quot;,
&quot;react-dom&quot;: &quot;^16.13.1&quot;,
&quot;rimraf&quot;: &quot;^3.0.2&quot;,
&quot;semantic-ui-react&quot;: &quot;^0.88.2&quot;,
&quot;terminal-table&quot;: &quot;^0.0.12&quot;,
&quot;type-coverage-core&quot;: &quot;^2.17.2&quot;
},
&quot;scripts&quot;: {
&quot;build&quot;: &quot;tsc&quot;,
&quot;lint&quot;: &quot;tsc --noEmit &amp;&amp; eslint &#x27;*/**/*.{js,ts,tsx}&#x27; --quiet --fix&quot;,
&quot;type-coverage&quot;: &quot;node ./dist/bin/typescript-coverage-report&quot;,
&quot;docs&quot;: &quot;yarn type-coverage --outputDir docs&quot;,
&quot;prepublish&quot;: &quot;yarn lint &amp;&amp; yarn build&quot;,
&quot;test&quot;: &quot;jest&quot;,
&quot;release&quot;: &quot;gren release&quot;
},
&quot;devDependencies&quot;: {
&quot;@babel/core&quot;: &quot;^7.9.0&quot;,
&quot;@babel/preset-env&quot;: &quot;^7.9.0&quot;,
&quot;@babel/preset-react&quot;: &quot;^7.9.4&quot;,
&quot;@babel/preset-typescript&quot;: &quot;^7.9.0&quot;,
&quot;@commitlint/cli&quot;: &quot;^8.3.5&quot;,
&quot;@commitlint/config-conventional&quot;: &quot;^8.3.4&quot;,
&quot;@testing-library/react&quot;: &quot;^10.0.1&quot;,
&quot;@types/jest&quot;: &quot;^25.1.4&quot;,
&quot;@types/ncp&quot;: &quot;^2.0.3&quot;,
&quot;@types/node&quot;: &quot;^13.9.2&quot;,
&quot;@types/react&quot;: &quot;^16.9.23&quot;,
&quot;@types/react-dom&quot;: &quot;^16.9.5&quot;,
&quot;@types/testing-library__react&quot;: &quot;^9.1.3&quot;,
&quot;@typescript-eslint/eslint-plugin&quot;: &quot;^2.25.0&quot;,
&quot;@typescript-eslint/parser&quot;: &quot;^2.25.0&quot;,
&quot;babel-jest&quot;: &quot;^25.1.0&quot;,
&quot;eslint&quot;: &quot;^6.8.0&quot;,
&quot;eslint-config-prettier&quot;: &quot;^6.10.1&quot;,
&quot;eslint-plugin-jest&quot;: &quot;^23.8.2&quot;,
&quot;eslint-plugin-prettier&quot;: &quot;^3.1.2&quot;,
&quot;eslint-plugin-react&quot;: &quot;^7.19.0&quot;,
&quot;github-release-notes&quot;: &quot;^0.17.1&quot;,
&quot;husky&quot;: &quot;^4.2.3&quot;,
&quot;jest&quot;: &quot;^25.1.0&quot;,
&quot;lint-staged&quot;: &quot;^10.0.8&quot;,
&quot;package-json-type&quot;: &quot;^1.0.3&quot;,
&quot;prettier&quot;: &quot;^2.0.2&quot;,
&quot;typescript&quot;: &quot;4.1.3&quot;
},
&quot;peerDependencies&quot;: {
&quot;typescript&quot;: &quot;2 || 3 || 4&quot;
},
&quot;husky&quot;: {
&quot;hooks&quot;: {
&quot;commit-msg&quot;: &quot;commitlint -E HUSKY_GIT_PARAMS&quot;,
&quot;pre-commit&quot;: &quot;lint-staged&quot;
}
},
&quot;lint-staged&quot;: {
&quot;*.{js,ts,tsx}&quot;: [
&quot;eslint --fix&quot;
],
&quot;*.{js,ts,tsx,json,md,css}&quot;: [
&quot;prettier --write&quot;
]
},
&quot;typeCoverage&quot;: {
&quot;atLeast&quot;: 90
}
}
</textarea><pre id="annotations" style="display:none">[]</pre></div>
<p class="footer-text">TypeScript Coverage Report generated by <a href="https://github.com/plantain-00/type-coverage">type-coverage</a> and <a href="https://github.com/alexcanessa/typescript-coverage-report">typescript-coverage-report</a> at Mon, 20 Dec 2021 10:37:39 GMT</p>
</body>
</html>

104 changes: 86 additions & 18 deletions docs/files/src/bin/typescript-coverage-report.ts.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,45 @@
<head>
<title>typescript-coverage-report.ts</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/semantic.min.css" type="text/css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.52.2/codemirror.min.js" type="text/javascript" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.52.2/mode/javascript/javascript.min.js" type="text/javascript" charset="utf-8"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.52.2/codemirror.min.css" type="text/css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/codemirror.min.js" type="text/javascript" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/mode/javascript/javascript.min.js" type="text/javascript" charset="utf-8"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/codemirror.min.css" type="text/css" rel="stylesheet">
<script src="../../../assets/source-file.js" type="text/javascript" charset="utf-8"></script>
<link href="../../../assets/source-file.css" type="text/css" rel="stylesheet">
</head>
<body>
<div style="margin-top:3em" class="ui container"><h1 class="ui header"><a href="../../../index.html">TypeScript coverage report</a></h1><table style="margin-top:2em" class="ui celled table"><thead class=""><tr class=""><th class="">Filename</th><th class="">Percent</th><th class="">Threshold</th><th class="">Total</th><th class="">Covered</th><th class="">Uncovered</th></tr></thead><tbody class=""><tr class="positive"><td class="">src/bin/typescript-coverage-report.ts</td><td class="">84.75%</td><td class="">80%</td><td class="">59</td><td class="">50</td><td class="">9</td></tr></tbody></table><textarea id="editor" readonly="" style="margin-top:3em">#!/usr/bin/env node
<div style="margin-top:3em" class="ui container"><h1 class="ui header"><a href="../../../index.html">TypeScript coverage report</a></h1><table style="margin-top:2em" class="ui celled table"><thead class=""><tr class=""><th class="">Filename</th><th class="">Percent</th><th class="">Threshold</th><th class="">Total</th><th class="">Covered</th><th class="">Uncovered</th></tr></thead><tbody class=""><tr class="positive"><td class="">src/bin/typescript-coverage-report.ts</td><td class="">91.41%</td><td class="">90%</td><td class="">128</td><td class="">117</td><td class="">11</td></tr></tbody></table><textarea id="editor" readonly="" style="margin-top:3em">#!/usr/bin/env node

import { program } from &quot;commander&quot;;
import generateCoverageReport from &quot;../lib&quot;;
import getOptions from &quot;../lib/getOptions&quot;;
import generateCoverageReport, { ProgramOptions } from &quot;../lib&quot;;
import path from &quot;path&quot;;
import { IPackageJson } from &quot;package-json-type&quot;;

type TypeCoverageConfig = {
outputDir?: string;
atLeast?: number;
strict?: boolean;
debug?: boolean;
cache?: boolean;
project?: string;
ignoreFiles?: boolean;
ignoreCatch?: boolean;
ignoreUnread?: boolean;
};

const {
version,
description,
description
}: // eslint-disable-next-line @typescript-eslint/no-var-requires
IPackageJson = require(&quot;../../package.json&quot;);

const {
typeCoverage = {}
// eslint-disable-next-line @typescript-eslint/no-var-requires
} = require(&quot;../../package.json&quot;);
}: // eslint-disable-next-line @typescript-eslint/no-var-requires
IPackageJson &amp; { typeCoverage?: TypeCoverageConfig } = require(path.join(
process.cwd(),
&quot;/package.json&quot;
));

const argvWithVersion = (argvs: string[]): string[] =&gt; {
const vPos = argvs.indexOf(&quot;-v&quot;);
Expand All @@ -34,25 +54,73 @@
return argvs;
};

const {
outputDir = &quot;coverage-ts&quot;,
atLeast = 80,
strict = false,
debug = false,
cache = false,
project = &quot;.&quot;,
ignoreFiles = false,
ignoreCatch = false,
ignoreUnread = false
} = typeCoverage;

program
.version(version)
.description(description)
.option(
&quot;-o, --outputDir [string]&quot;,
&quot;The output directory where to generate the report.&quot;,
&quot;coverage-ts&quot;
&quot;the output directory where to generate the report.&quot;,
outputDir
)
.option(
&quot;-t, --threshold [number]&quot;,
&quot;The minimum percentage of coverage required.&quot;,
&quot;the minimum percentage of coverage required.&quot;,
parseFloat,
typeCoverage.atLeast || 80
atLeast
)
.option(&quot;-s, --strict [boolean]&quot;, &quot;run the check in strict mode.&quot;, strict)
.option(&quot;-d, --debug [boolean]&quot;, &quot;show debug information.&quot;, debug)
.option(
&quot;-c, --cache [boolean]&quot;,
&quot;save and reuse type check result from cache.&quot;,
cache
)
.option(
&quot;-p, --project [string]&quot;,
&#x27;file path to tsconfig file, eg: --project &quot;./app/tsconfig.app.json&quot;&#x27;,
project
)
.option(
&quot;-i, --ignore-files [string[]]&quot;,
&#x27;ignore specified files, eg: --ignore-files &quot;demo1/*.ts&quot; --ignore-files &quot;demo2/foo.ts&quot;&#x27;,
ignoreFiles
)
.option(
&quot;--ignore-catch [boolean]&quot;,
&quot;ignore type any for (try-)catch clause variable&quot;,
ignoreCatch
)
.option(
&quot;-u, --ignore-unread [boolean]&quot;,
&quot;allow writes to variables with implicit any types&quot;,
ignoreUnread
)
.option(&quot;-s, --strict [boolean]&quot;, &quot;Run the check in strict mode.&quot;, false)
.option(&quot;-d, --debug [boolean]&quot;, &quot;Show debug information.&quot;, false)
.parse(argvWithVersion(process.argv));

const options = getOptions(program);
const options: ProgramOptions = {
/* camelCase keys matching &quot;long&quot; flags in options above */
outputDir: program.outputDir,
threshold: program.threshold,
tsProjectFile: program.project,
strict: program.strict,
debug: program.debug,
cache: program.cache,
ignoreFiles: program.ignoreFiles,
ignoreCatch: program.ignoreCatch,
ignoreUnread: program.ignoreUnread
};

generateCoverageReport(options)
.then(({ percentage }) =&gt; {
Expand All @@ -73,8 +141,8 @@

process.exit(255);
});
</textarea><pre id="annotations" style="display:none">[{&quot;file&quot;:&quot;src/bin/typescript-coverage-report.ts&quot;,&quot;line&quot;:7,&quot;character&quot;:2,&quot;text&quot;:&quot;version&quot;},{&quot;file&quot;:&quot;src/bin/typescript-coverage-report.ts&quot;,&quot;line&quot;:8,&quot;character&quot;:2,&quot;text&quot;:&quot;description&quot;},{&quot;file&quot;:&quot;src/bin/typescript-coverage-report.ts&quot;,&quot;line&quot;:9,&quot;character&quot;:2,&quot;text&quot;:&quot;typeCoverage&quot;},{&quot;file&quot;:&quot;src/bin/typescript-coverage-report.ts&quot;,&quot;line&quot;:24,&quot;character&quot;:11,&quot;text&quot;:&quot;version&quot;},{&quot;file&quot;:&quot;src/bin/typescript-coverage-report.ts&quot;,&quot;line&quot;:25,&quot;character&quot;:15,&quot;text&quot;:&quot;description&quot;},{&quot;file&quot;:&quot;src/bin/typescript-coverage-report.ts&quot;,&quot;line&quot;:35,&quot;character&quot;:4,&quot;text&quot;:&quot;typeCoverage&quot;},{&quot;file&quot;:&quot;src/bin/typescript-coverage-report.ts&quot;,&quot;line&quot;:35,&quot;character&quot;:17,&quot;text&quot;:&quot;atLeast&quot;},{&quot;file&quot;:&quot;src/bin/typescript-coverage-report.ts&quot;,&quot;line&quot;:57,&quot;character&quot;:10,&quot;text&quot;:&quot;error&quot;},{&quot;file&quot;:&quot;src/bin/typescript-coverage-report.ts&quot;,&quot;line&quot;:58,&quot;character&quot;:18,&quot;text&quot;:&quot;error&quot;}]</pre></div>
<p class="footer-text">TypeScript Coverage Report generated by <a href="https://github.com/plantain-00/type-coverage">type-coverage</a> and <a href="https://github.com/alexcanessa/typescript-coverage-report">typescript-coverage-report</a> at Mon, 30 Mar 2020 11:56:57 GMT</p>
</textarea><pre id="annotations" style="display:none">[{&quot;file&quot;:&quot;src/bin/typescript-coverage-report.ts&quot;,&quot;line&quot;:100,&quot;character&quot;:21,&quot;text&quot;:&quot;outputDir&quot;,&quot;kind&quot;:1},{&quot;file&quot;:&quot;src/bin/typescript-coverage-report.ts&quot;,&quot;line&quot;:101,&quot;character&quot;:21,&quot;text&quot;:&quot;threshold&quot;,&quot;kind&quot;:1},{&quot;file&quot;:&quot;src/bin/typescript-coverage-report.ts&quot;,&quot;line&quot;:102,&quot;character&quot;:25,&quot;text&quot;:&quot;project&quot;,&quot;kind&quot;:1},{&quot;file&quot;:&quot;src/bin/typescript-coverage-report.ts&quot;,&quot;line&quot;:103,&quot;character&quot;:18,&quot;text&quot;:&quot;strict&quot;,&quot;kind&quot;:1},{&quot;file&quot;:&quot;src/bin/typescript-coverage-report.ts&quot;,&quot;line&quot;:104,&quot;character&quot;:17,&quot;text&quot;:&quot;debug&quot;,&quot;kind&quot;:1},{&quot;file&quot;:&quot;src/bin/typescript-coverage-report.ts&quot;,&quot;line&quot;:105,&quot;character&quot;:17,&quot;text&quot;:&quot;cache&quot;,&quot;kind&quot;:1},{&quot;file&quot;:&quot;src/bin/typescript-coverage-report.ts&quot;,&quot;line&quot;:106,&quot;character&quot;:23,&quot;text&quot;:&quot;ignoreFiles&quot;,&quot;kind&quot;:1},{&quot;file&quot;:&quot;src/bin/typescript-coverage-report.ts&quot;,&quot;line&quot;:107,&quot;character&quot;:23,&quot;text&quot;:&quot;ignoreCatch&quot;,&quot;kind&quot;:1},{&quot;file&quot;:&quot;src/bin/typescript-coverage-report.ts&quot;,&quot;line&quot;:108,&quot;character&quot;:24,&quot;text&quot;:&quot;ignoreUnread&quot;,&quot;kind&quot;:1},{&quot;file&quot;:&quot;src/bin/typescript-coverage-report.ts&quot;,&quot;line&quot;:125,&quot;character&quot;:10,&quot;text&quot;:&quot;error&quot;,&quot;kind&quot;:1},{&quot;file&quot;:&quot;src/bin/typescript-coverage-report.ts&quot;,&quot;line&quot;:126,&quot;character&quot;:18,&quot;text&quot;:&quot;error&quot;,&quot;kind&quot;:1}]</pre></div>
<p class="footer-text">TypeScript Coverage Report generated by <a href="https://github.com/plantain-00/type-coverage">type-coverage</a> and <a href="https://github.com/alexcanessa/typescript-coverage-report">typescript-coverage-report</a> at Mon, 20 Dec 2021 10:37:39 GMT</p>
</body>
</html>

10 changes: 5 additions & 5 deletions docs/files/src/components/DetailPage/DetailPage.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<head>
<title>DetailPage.tsx</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/semantic.min.css" type="text/css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.52.2/codemirror.min.js" type="text/javascript" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.52.2/mode/javascript/javascript.min.js" type="text/javascript" charset="utf-8"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.52.2/codemirror.min.css" type="text/css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/codemirror.min.js" type="text/javascript" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/mode/javascript/javascript.min.js" type="text/javascript" charset="utf-8"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/codemirror.min.css" type="text/css" rel="stylesheet">
<script src="../../../../assets/source-file.js" type="text/javascript" charset="utf-8"></script>
<link href="../../../../assets/source-file.css" type="text/css" rel="stylesheet">
</head>
<body>
<div style="margin-top:3em" class="ui container"><h1 class="ui header"><a href="../../../../index.html">TypeScript coverage report</a></h1><table style="margin-top:2em" class="ui celled table"><thead class=""><tr class=""><th class="">Filename</th><th class="">Percent</th><th class="">Threshold</th><th class="">Total</th><th class="">Covered</th><th class="">Uncovered</th></tr></thead><tbody class=""><tr class="positive"><td class="">src/components/DetailPage/DetailPage.tsx</td><td class="">100.00%</td><td class="">80%</td><td class="">133</td><td class="">133</td><td class="">0</td></tr></tbody></table><textarea id="editor" readonly="" style="margin-top:3em">import React from &quot;react&quot;;
<div style="margin-top:3em" class="ui container"><h1 class="ui header"><a href="../../../../index.html">TypeScript coverage report</a></h1><table style="margin-top:2em" class="ui celled table"><thead class=""><tr class=""><th class="">Filename</th><th class="">Percent</th><th class="">Threshold</th><th class="">Total</th><th class="">Covered</th><th class="">Uncovered</th></tr></thead><tbody class=""><tr class="positive"><td class="">src/components/DetailPage/DetailPage.tsx</td><td class="">100.00%</td><td class="">90%</td><td class="">133</td><td class="">133</td><td class="">0</td></tr></tbody></table><textarea id="editor" readonly="" style="margin-top:3em">import React from &quot;react&quot;;
import path from &quot;path&quot;;
import { Container, Table, Header } from &quot;semantic-ui-react&quot;;

Expand Down Expand Up @@ -93,7 +93,7 @@

export default DetailPage;
</textarea><pre id="annotations" style="display:none">[]</pre></div>
<p class="footer-text">TypeScript Coverage Report generated by <a href="https://github.com/plantain-00/type-coverage">type-coverage</a> and <a href="https://github.com/alexcanessa/typescript-coverage-report">typescript-coverage-report</a> at Mon, 30 Mar 2020 11:56:57 GMT</p>
<p class="footer-text">TypeScript Coverage Report generated by <a href="https://github.com/plantain-00/type-coverage">type-coverage</a> and <a href="https://github.com/alexcanessa/typescript-coverage-report">typescript-coverage-report</a> at Mon, 20 Dec 2021 10:37:39 GMT</p>
</body>
</html>

Loading

0 comments on commit 0d34a16

Please sign in to comment.