-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Implemented nextra and further refactoring
- Loading branch information
Showing
173 changed files
with
11,133 additions
and
17,893 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"typedoc-plugin-frontmatter": patch | ||
"typedoc-vitepress-theme": patch | ||
"typedoc-plugin-remark": patch | ||
--- | ||
|
||
- Updated documentation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: CI [typedoc-plugin-frontmatter] | ||
on: | ||
push: | ||
paths: | ||
- packages/typedoc-plugin-frontmatter/** | ||
pull_request: | ||
paths: | ||
- packages/typedoc-plugin-frontmatter/** | ||
jobs: | ||
lint-and-test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: ['18'] | ||
name: Node ${{ matrix.node }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Set up Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: 'npm' | ||
- name: Install | ||
run: npm install | ||
- name: Lint | ||
run: npm run lint --workspace typedoc-plugin-frontmatter | ||
- name: Build | ||
run: npm run build --workspace typedoc-plugin-markdown --workspace typedoc-plugin-frontmatter | ||
- name: Test | ||
run: npm run test --workspace typedoc-plugin-frontmatter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: CI [typedoc-plugin-remark] | ||
on: | ||
push: | ||
paths: | ||
- packages/typedoc-plugin-remark/** | ||
pull_request: | ||
paths: | ||
- packages/typedoc-plugin-remark/** | ||
jobs: | ||
lint-and-test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: ['18'] | ||
name: Node ${{ matrix.node }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Set up Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: 'npm' | ||
- name: Install | ||
run: npm install | ||
- name: Lint | ||
run: npm run lint --workspace typedoc-plugin-remark | ||
- name: Build | ||
run: npm run build --workspace typedoc-plugin-markdown --workspace typedoc-plugin-remark | ||
- name: Test | ||
run: npm run test --workspace typedoc-plugin-remark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
# Packages | ||
|
||
| Package | Version | Downloads | Changelog | | ||
| :---| :---| :--- | --- | | ||
[typedoc-plugin-markdown](./packages/typedoc-plugin-markdown#readme) | ![npm](https://img.shields.io/npm/v/typedoc-plugin-markdown%2Fnext?style=flat-square&logo=npm) | ![Downloads](https://img.shields.io/npm/dm/typedoc-plugin-markdown) | [Changelog](./packages/typedoc-plugin-markdown/CHANGELOG.md) | | ||
[docusaurus-plugin-typedoc](./packages/docusaurus-plugin-typedoc#readme) | ![npm](https://img.shields.io/npm/v/docusaurus-plugin-typedoc%2Fnext?style=flat-square&logo=npm) | ![Downloads](https://img.shields.io/npm/dm/docusaurus-plugin-typedoc) | [Changelog](./packages/docusaurus-plugin-typedoc/CHANGELOG.md) | | ||
[typedoc-github-wiki-theme](./packages/typedoc-github-wiki-theme#readme) | ![npm](https://img.shields.io/npm/v/typedoc-github-wiki-theme%2Fnext?style=flat-square&logo=npm) | ![Downloads](https://img.shields.io/npm/dm/typedoc-github-wiki-theme) | [Changelog](./packages/typedoc-github-wiki-theme/CHANGELOG.md) | | ||
[typedoc-gitlab-wiki-theme](./packages/typedoc-gitlab-wiki-theme#readme) | ![npm](https://img.shields.io/npm/v/typedoc-gitlab-wiki-theme%2Fnext?style=flat-square&logo=npm) | ![Downloads](https://img.shields.io/npm/dm/typedoc-gitlab-wiki-theme) | [Changelog](./packages/typedoc-gitlab-wiki-theme/CHANGELOG.md) | | ||
[typedoc-vitepress-theme](./packages/typedoc-vitepress-theme#readme) | ![npm](https://img.shields.io/npm/v/typedoc-vitepress-theme%2Fnext?style=flat-square&logo=npm) | ![Downloads](https://img.shields.io/npm/dm/typedoc-vitepress-theme) | [Changelog](./packages/typedoc-vitepress-theme/CHANGELOG.md) | | ||
| 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) | | ||
[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-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) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
#!/usr/bin/env ts-node | ||
|
||
import { DOCS_CONFIG } from '@dev-packages/helpers'; | ||
import { consola } from 'consola'; | ||
import * as fs from 'fs'; | ||
|
||
main(); | ||
|
||
async function main() { | ||
const packagesPromises = [ | ||
'typedoc-plugin-markdown', | ||
'typedoc-plugin-frontmatter', | ||
'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` | ||
); | ||
return { | ||
name: packageName, | ||
description: packageJson.description, | ||
}; | ||
}); | ||
const packages = await Promise.all(packagesPromises); | ||
|
||
writeRepositoryReadme(packages); | ||
packages.forEach((packageItem) => writePackageReadme(packageItem)); | ||
consola.success(`Generate readmes complete`); | ||
} | ||
|
||
function writeRepositoryReadme(packages: any) { | ||
const readme = ['# Packages\n']; | ||
const headers: string[] = []; | ||
headers.push('| Package | Badges | '); | ||
headers.push('| :---| :---|'); | ||
|
||
const rows = packages.map((packageItem) => { | ||
const badges = [ | ||
`![npm](https://img.shields.io/npm/v/${packageItem.name}%2Fnext?\&logo=npm)`, | ||
`![Downloads](https://img.shields.io/npm/dm/${packageItem.name})`, | ||
]; | ||
return ( | ||
[ | ||
`[${packageItem.name}](./packages/${packageItem.name}#readme)`, | ||
badges.join(' '), | ||
].join(' | ') + ' | ' | ||
); | ||
}); | ||
|
||
readme.push(...headers, ...rows); | ||
|
||
fs.writeFileSync('README.md', readme.join('\n')); | ||
} | ||
|
||
function writePackageReadme(packageItem: any) { | ||
const readme = [`# ${packageItem.name}`]; | ||
const badges = [ | ||
`![npm](https://img.shields.io/npm/v/${packageItem.name}%2Fnext?\&logo=npm)`, | ||
`![Downloads](https://img.shields.io/npm/dm/${packageItem.name})`, | ||
`[![Build Status](https://github.com/tgreyuk/typedoc-plugin-markdown/actions/workflows/ci.yml/badge.svg?branch=next)](https://github.com/tgreyuk/typedoc-plugin-markdown/actions/workflows/ci.yml)`, | ||
]; | ||
|
||
readme.push(badges.join(' ')); | ||
readme.push(`${packageItem.description}`); | ||
const docLink = `https://typedoc-plugin-markdown.org${ | ||
DOCS_CONFIG[packageItem.name].docsPath | ||
}`; | ||
|
||
readme.push('## Installation'); | ||
readme.push(`\`\`\`shell | ||
npm install ${packageItem.name} --save-dev | ||
\`\`\``); | ||
|
||
readme.push('## Documentation'); | ||
const resources = [`Please visit ${docLink}.`]; | ||
readme.push(resources.join('\n')); | ||
readme.push('## License'); | ||
readme.push( | ||
`Released under the [MIT License](./packages/${packageItem.name}/LICENSE.md).`, | ||
); | ||
|
||
fs.writeFileSync( | ||
`./packages/${packageItem.name}/README.md`, | ||
readme.join('\n\n'), | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "@dev-packages/generate-readmes", | ||
"private": true, | ||
"files": [ | ||
"/" | ||
], | ||
"bin": { | ||
"generate-readmes": "cli.ts" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "@dev-packages/helpers", | ||
"private": true, | ||
"main": "src/index.ts", | ||
"files": [ | ||
"/" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { DocsConfig } from './models'; | ||
|
||
export const DECLARATIONS_PATH = `${process.cwd()}/src/options/declarations.ts`; | ||
|
||
export const PRESETS_PATH = `${process.cwd()}/src/options/presets.ts`; | ||
|
||
export const DOCS_CONFIG: Record<string, DocsConfig> = { | ||
['typedoc-plugin-markdown']: { | ||
optionsPath: 'options', | ||
docsPath: '', | ||
declarations: true, | ||
presets: false, | ||
}, | ||
['typedoc-plugin-frontmatter']: { | ||
optionsPath: 'utilities/frontmatter', | ||
docsPath: '/utilities/frontmatter', | ||
declarations: true, | ||
presets: false, | ||
}, | ||
['typedoc-plugin-remark']: { | ||
optionsPath: 'utilities/remark', | ||
docsPath: '/utilities/remark', | ||
declarations: true, | ||
presets: false, | ||
}, | ||
['typedoc-github-wiki-theme']: { | ||
optionsPath: 'themes/github-wiki', | ||
docsPath: '/themes/github-wiki', | ||
declarations: false, | ||
presets: true, | ||
}, | ||
['typedoc-gitlab-wiki-theme']: { | ||
optionsPath: 'themes/gitlab-wiki', | ||
docsPath: '/themes/gitlab-wiki', | ||
declarations: false, | ||
presets: true, | ||
}, | ||
['typedoc-vitepress-theme']: { | ||
optionsPath: 'themes/vitepress', | ||
docsPath: '/themes/vitepress', | ||
declarations: true, | ||
presets: false, | ||
}, | ||
['docusaurus-plugin-typedoc']: { | ||
optionsPath: '/integrations/docusaurus/options', | ||
docsPath: '/integrations/docusaurus', | ||
declarations: false, | ||
presets: false, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from './constants'; | ||
export * from './methods'; | ||
export * from './models'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import * as path from 'path'; | ||
|
||
export function getPackageName() { | ||
const cwdParts = process.cwd().split(path.sep); | ||
return cwdParts[cwdParts.length - 1]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export interface DocsConfig { | ||
optionsPath: string; | ||
docsPath: string; | ||
declarations: boolean; | ||
presets: boolean; | ||
} | ||
|
||
export interface OptionDocument { | ||
name: string; | ||
comments: string; | ||
tags: { name: string; comments: string }[]; | ||
example: string; | ||
category: string; | ||
help: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env ts-node | ||
|
||
import { DOCS_CONFIG, DocsConfig, getPackageName } from '@dev-packages/helpers'; | ||
import { consola } from 'consola'; | ||
import { generateDocs } from './tasks/generate-docs'; | ||
import { generateModels } from './tasks/generate-models'; | ||
|
||
main(); | ||
|
||
async function main() { | ||
const docsConfig: DocsConfig = DOCS_CONFIG[getPackageName()]; | ||
if (docsConfig.declarations) { | ||
await generateModels(); | ||
} | ||
await generateDocs(docsConfig); | ||
consola.success(`[${getPackageName()}] Prebuild options complete`); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "@dev-packages/prebuild-options", | ||
"private": true, | ||
"files": [ | ||
"/" | ||
], | ||
"bin": { | ||
"prebuild-options": "cli.ts" | ||
} | ||
} |
Oops, something went wrong.