Skip to content

Commit

Permalink
chore(global): added commitlint
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreyuk committed Apr 28, 2024
1 parent ce8756a commit 18ce8eb
Show file tree
Hide file tree
Showing 17 changed files with 1,312 additions and 41 deletions.
4 changes: 4 additions & 0 deletions .husky/commit-msg
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx commitlint --edit ${1}
16 changes: 8 additions & 8 deletions README.md
Expand Up @@ -2,21 +2,21 @@

This project is a collection of packages designed for generate TypeScript API documentation as Markdown.

## Documentation

Please visit the [undefined](undefined) for comprehensive documentation, including options and usage guides.

## Packages

| Package | Badges |
| :---| :---|
[typedoc-plugin-markdown](./packages/typedoc-plugin-markdown#readme) | ![npm](https://img.shields.io/npm/v/typedoc-plugin-markdown%2Fnext?&logo=npm) ![Downloads](https://img.shields.io/npm/dm/typedoc-plugin-markdown) |
[docusaurus-plugin-typedoc](./packages/docusaurus-plugin-typedoc#readme) | ![npm](https://img.shields.io/npm/v/docusaurus-plugin-typedoc%2Fnext?&logo=npm) ![Downloads](https://img.shields.io/npm/dm/docusaurus-plugin-typedoc) |
[typedoc-github-wiki-theme](./packages/typedoc-github-wiki-theme#readme) | ![npm](https://img.shields.io/npm/v/typedoc-github-wiki-theme%2Fnext?&logo=npm) ![Downloads](https://img.shields.io/npm/dm/typedoc-github-wiki-theme) |
[typedoc-plugin-frontmatter](./packages/typedoc-plugin-frontmatter#readme) | ![npm](https://img.shields.io/npm/v/typedoc-plugin-frontmatter%2Fnext?&logo=npm) ![Downloads](https://img.shields.io/npm/dm/typedoc-plugin-frontmatter) |
[typedoc-vitepress-theme](./packages/typedoc-vitepress-theme#readme) | ![npm](https://img.shields.io/npm/v/typedoc-vitepress-theme%2Fnext?&logo=npm) ![Downloads](https://img.shields.io/npm/dm/typedoc-vitepress-theme) |
[typedoc-gitlab-wiki-theme](./packages/typedoc-gitlab-wiki-theme#readme) | ![npm](https://img.shields.io/npm/v/typedoc-gitlab-wiki-theme%2Fnext?&logo=npm) ![Downloads](https://img.shields.io/npm/dm/typedoc-gitlab-wiki-theme) |
[typedoc-plugin-remark](./packages/typedoc-plugin-remark#readme) | ![npm](https://img.shields.io/npm/v/typedoc-plugin-remark%2Fnext?&logo=npm) ![Downloads](https://img.shields.io/npm/dm/typedoc-plugin-remark) |
[typedoc-github-wiki-theme](./packages/typedoc-github-wiki-theme#readme) | ![npm](https://img.shields.io/npm/v/typedoc-github-wiki-theme%2Fnext?&logo=npm) ![Downloads](https://img.shields.io/npm/dm/typedoc-github-wiki-theme) |
[typedoc-gitlab-wiki-theme](./packages/typedoc-gitlab-wiki-theme#readme) | ![npm](https://img.shields.io/npm/v/typedoc-gitlab-wiki-theme%2Fnext?&logo=npm) ![Downloads](https://img.shields.io/npm/dm/typedoc-gitlab-wiki-theme) |
[typedoc-vitepress-theme](./packages/typedoc-vitepress-theme#readme) | ![npm](https://img.shields.io/npm/v/typedoc-vitepress-theme%2Fnext?&logo=npm) ![Downloads](https://img.shields.io/npm/dm/typedoc-vitepress-theme) |
[docusaurus-plugin-typedoc](./packages/docusaurus-plugin-typedoc#readme) | ![npm](https://img.shields.io/npm/v/docusaurus-plugin-typedoc%2Fnext?&logo=npm) ![Downloads](https://img.shields.io/npm/dm/docusaurus-plugin-typedoc) |

## Documentation

Please see [typedoc-plugin-markdown.org](https://typedoc-plugin-markdown.org).

## Examples

Expand Down
27 changes: 27 additions & 0 deletions commitlint.config.cjs
@@ -0,0 +1,27 @@
module.exports = {
extends: ['@commitlint/config-conventional'],

rules: {
'type-enum': [2, 'always', ['chore', 'docs', 'feat', 'fix', 'test']],
'scope-empty': [2, 'never'],
'scope-enum': [
2,
'always',
[
'global',
'core',
'frontmatter',
'remark',
'docusaurus',
'vitepress',
'githubwiki',
'gitlabwiki',
'docs',
'refactor',
'quality',
],
],
},

ignores: [(commit) => commit.startsWith('Version Packages')],
};
18 changes: 10 additions & 8 deletions devtools/scripts/generate-readmes.ts
Expand Up @@ -27,12 +27,12 @@ async function copyChangelog() {
async function main() {
const packagesPromises = [
'typedoc-plugin-markdown',
'docusaurus-plugin-typedoc',
'typedoc-github-wiki-theme',
'typedoc-plugin-frontmatter',
'typedoc-vitepress-theme',
'typedoc-gitlab-wiki-theme',
'typedoc-plugin-remark',
'typedoc-github-wiki-theme',
'typedoc-gitlab-wiki-theme',
'typedoc-vitepress-theme',
'docusaurus-plugin-typedoc',
].map(async (packageName) => {
const packageJson = await import(
`../../packages/${packageName}/package.json`
Expand All @@ -58,10 +58,6 @@ function writeRepositoryReadme(packages: any) {
'This project is a collection of packages designed for generate TypeScript API documentation as Markdown.',
);

readme.push('## Documentation');

readme.push(docText());

readme.push('## Packages');
const headers: string[] = [];
headers.push('| Package | Badges | ');
Expand All @@ -83,6 +79,12 @@ function writeRepositoryReadme(packages: any) {

readme.push(table.join('\n'));

readme.push('## Documentation');

readme.push(
'Please see [typedoc-plugin-markdown.org](https://typedoc-plugin-markdown.org).',
);

readme.push('## Examples');

readme.push(
Expand Down
1 change: 0 additions & 1 deletion docs/pages/docs/changelog.mdx
Expand Up @@ -11,7 +11,6 @@ import { Callout } from 'nextra/components';
- Handlebars as a dependency has been removed.
- Updated customization model with the ability to set hooks, events and custom theming.
- Exposed navigation structure.
- Greater test coverage including parsing linting output with MarkdownLint and remark-mdx.

### 🌟 Features

Expand Down
4 changes: 2 additions & 2 deletions docs/pages/index.mdx
Expand Up @@ -9,7 +9,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
typedoc-plugin-markdown
</span>
<div className="flex md:flex-row items-center text-3xl">
<Image src="/ts-logo.png" alt="TypeScript" width={54} height={54} />
<Image src="/logos/ts-logo.png" alt="TypeScript" width={54} height={54} />
<span className="px-2"> → </span>
<div style={{ width: '90px' }}>
<FontAwesomeIcon icon={faMarkdown} />
Expand All @@ -25,7 +25,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
width={30}
height={30}
style={{ display: 'inline' }}
/> <a href="https://typedoc.org" class="hover:underline" target="_blank">TypeDoc</a>.
/> <a href="https://typedoc.org" className="hover:underline" target="_blank">TypeDoc</a>.
</div>
</div>
</div>
Expand Down
41 changes: 21 additions & 20 deletions docs/pages/plugins/index.mdx
Expand Up @@ -31,37 +31,38 @@ Utility plugins that can be used to provide metadata or adjust the output of the
Plugins that can be used to integrate and target output for specific platforms.

<Cards num={2}>

<Cards.Card
title="docusaurus-plugin-typedoc"
icon={
<Image
src="/docusaurus-logo.svg"
alt="Docusaurus"
width={26}
height={26}
/>
}
title="typedoc-github-wiki-theme"
icon={<Image src="/logos/github-logo.svg" alt="Gitlab" width={26} height={26} />}
arrow={true}
href="plugins/docusaurus"
href="plugins/github-wiki"
/>
<Cards.Card
title="typedoc-gitlab-wiki-theme"
icon={<Image src="/logos/gitlab-logo.png" alt="Gitlab" width={26} height={26} />}
arrow={true}
href="plugins/gitlab-wiki"
/>
<Cards.Card
title="typedoc-vitepress-theme"
icon={
<Image src="/vuepress-logo.png" alt="VuePress" width={26} height={26} />
<Image src="/logos/vuepress-logo.png" alt="VuePress" width={26} height={26} />
}
arrow={true}
href="plugins/vitepress"
/>
<Cards.Card
title="typedoc-github-wiki-theme"
icon={<Image src="/github-logo.svg" alt="Gitlab" width={26} height={26} />}
arrow={true}
href="plugins/github-wiki"
/>
<Cards.Card
title="typedoc-gitlab-wiki-theme"
icon={<Image src="/gitlab-logo.png" alt="Gitlab" width={26} height={26} />}
title="docusaurus-plugin-typedoc"
icon={
<Image
src="/logos/docusaurus-logo.svg"
alt="Docusaurus"
width={26}
height={26}
/>
}
arrow={true}
href="plugins/gitlab-wiki"
href="plugins/docusaurus"
/>
</Cards>
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion docs/theme.config.jsx
Expand Up @@ -56,7 +56,7 @@ export default {
const url = `https://typedoc-plugin-markdown.org${pathname}`;
return (
<>
<link rel="icon" href="/markdown-logo.svg" type="image/png" />
<link rel="icon" href="/logos/markdown-logo.svg" type="image/png" />
<title>
{`typedoc-plugin-markdown • ${title || 'Generate TypeScript API documentation as Markdown.'}`}
</title>
Expand Down

0 comments on commit 18ce8eb

Please sign in to comment.