Skip to content

Commit

Permalink
feat: add treatWarningsAsErrors option
Browse files Browse the repository at this point in the history
  • Loading branch information
stropitek committed Dec 3, 2023
1 parent 8df307b commit 3c7d8ab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ inputs:
description: 'Entry point of your API'
required: true
default: 'src/index.ts'
treatWarningsAsErrors:
description: 'Treat warnings as errors'
required: false
default: 'false'

name:
description: 'Name of the package'
runs:
Expand Down
2 changes: 2 additions & 0 deletions index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { exec } from '@actions/exec';

const entry = core.getInput('entry') || 'src/index.ts';
const name = core.getInput('name');
const treatWarningsAsErrors = core.getInput('treatWarningsAsErrors');

const defaultTsconfig = `{
"compilerOptions": {
Expand Down Expand Up @@ -58,6 +59,7 @@ async function writeTypedocJson(name, tsConfigPath) {
hideGenerator: true,
tsconfig: path.resolve(tsConfigPath),
entryPoints: entry.split(/ +/).map((entry) => path.resolve(entry)),
treatWarningsAsErrors: treatWarningsAsErrors === 'true',
plugin: ['typedoc-plugin-katex'],
// typedoc-plugin-katex plugin options
katex: {
Expand Down
2 changes: 1 addition & 1 deletion node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3c7d8ab

Please sign in to comment.