generated from sapphiredev/sapphire-template
-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- feat: start setting up the plugin for parsing - feat: start parsing classes - feat: update framework json - fix: fixed rendering custom files with css - chore: update framework json to exclude externals - feat: setup parsing sapphire classes and do a lot of link fixing - refactor: switch to sapphire result - fix: remove replaceall for Node 14 compat - fix: actually remove replaceAll - fix: fixed css extraction regex - I thought I did this already - fix: fixed broken link on welcome page - chore: temporarily disable reporting broken links - feat: much stuff - change `classes` to `class` to match DJS - add `typedef` and `namespace` linking - fix linking of non-generic types - update guide urls to match `class` change - chore: bump deps - chore: cleanup types - feat: add variant to typedefs - build: make it easier to debug - fix: partially fix link extraction - feat(docgen): add renderTypedef() - Moved parseSee() from /lib/renderer/renderClass.ts to /lib/renderer/utils.ts - Add /lib/renderer/renderTypedef.ts Which adds basic functionality in the website with things like title, description and extendedDescription - chore: sort ts interfaces in docgen output - chore: update doc types - refactor: completely refactor how links are resolved - fix: fixed links for `{@link` tags and propegate change to mdn and djs - fix: use `replace` instead of `replaceAll` - feat(docusaurus-discordjs-docgen): add functionality for enum and interface - style(docusaurus-discordjs-docgen): use Array#flat() for typedef - feat(docusaurus-discordjs-docgen): add constructor table functionality for classes - feat(docusaurus-discordjs-docgen): align table content to center - feat(docusaurus-discordjs-docgen): remove description column if all falsy - feat(docusaurus-discordjs-docgen): add properties functionality for classes - ci: add automatic vercel deploys workflow - chore(docusaurus-typedoc-json-parser): initial commit - chore(docusaurus-typedoc-json-parser): add doc fetching - chore(docusaurus-typedoc-json-parser): add sidebar rendering - fix(deps): update all non-major dependencies - fix(deps): update dependency typedoc-json-parser to ^5.2.0 - feat(docusaurus-typedoc-json-parser): add basic renderers - style(docusaurus-typedoc-json-parser): curly brackets and spacing - style(docusaurus-typedoc-json-parser): template literals - feat(docusaurus-typedoc-json-parser): add class extends and implements - feat(docusaurus-typedoc-json-parser): add link parsing for the local project - chore(docusaurus-typedoc-json-parser): add `start` script to bypass debugger - feat(docusaurus-typedoc-json-parser): add comment info for classes - chore: update dev deps - chore: regen and dedupe lockfile - fix(docusaurus-typedoc-json-parser): absorb breaking changes and add versioning - refactor: switch to using typedoc-json-parser plugin - chore: add `update` script - fix(deps): update dependency typedoc-json-parser to ^6.0.2 - fix(docusaurus-typedoc-json-parser): proper category yamls - feat(docusaurus-typedoc-json-parser): first steps to proper type linking - refactor(docusaurus-typedoc-json-parser): switch from constant to variable - feat(docusaurus-typedoc-json-parser): render classes - ci: use tags for actions - chore: cleanup - fix(typedoc-parser): fixed no auth requests - refactor: depluginize the plugin - chore: fix typecheck - chore: update to yarn 3.2.4 - chore: remove unnecessary package script - feat(json-parser): render enums - chore(json-parser): remove useless script - feat(json-parser): render functions - feat(json-parser): add accessibility and static modifiers for class methods - feat(json-parser): more steps towards proper reference linking - chore(deps): update dependency typedoc-json-parser to ^7.0.0 - fix(deps): update dependency typedoc-json-parser to ^7.0.1 - feat(json-parser): even more steps to proper reference linking - chore: update deps - feat: add ReadOnlyPill code - feat: add code for other pills - fix: flex wrap items - chore: update readme banner
- Loading branch information
Showing
54 changed files
with
1,370 additions
and
3,935 deletions.
There are no files selected for viewing
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,13 +1,9 @@ | ||
# Node modules | ||
node_modules/ | ||
|
||
# Submodules | ||
projects/ | ||
|
||
# Generated data | ||
docs/Documentation/ | ||
.docusaurus/ | ||
json-parser/dist/ | ||
|
||
src/index.d.ts | ||
|
||
docs/Guide/code/ |
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,16 @@ | ||
name: Automatic Vercel Deploys | ||
|
||
on: | ||
# TODO: Enable pre-merge | ||
# schedule: | ||
# - cron: '30 3 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
AutomaticVercelDeploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Trigger Vercel Deploy | ||
run: curl -X POST ${VERCEL_DEPLOY_HOOK_URL} | ||
env: | ||
VERCEL_DEPLOY_HOOK_URL: ${{ secrets.VERCEL_DEPLOY_HOOK_URL }} |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,10 +1,8 @@ | ||
# Node modules | ||
node_modules/ | ||
|
||
# Submodules | ||
projects/ | ||
|
||
# Generated data | ||
docs/Documentation/ | ||
.docusaurus/ | ||
build/ | ||
json-parser/dist/ |
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,20 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"type": "pwa-node", | ||
"request": "launch", | ||
"runtimeArgs": ["run-script", "debug"], | ||
"name": "Debug Docgen", | ||
"runtimeExecutable": "npm", | ||
"skipFiles": ["<node_internals>/**", "node_modules/tslib/**"], | ||
"internalConsoleOptions": "openOnSessionStart", | ||
"cwd": "${workspaceFolder}/json-parser", | ||
"env": { | ||
"NODE_ENV": "development" | ||
}, | ||
"console": "internalConsole", | ||
"outputCapture": "std", | ||
"outFiles": ["${workspaceFolder}/json-parser/dist/**/*.js"] | ||
} | ||
] | ||
} |
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 |
---|---|---|
|
@@ -9,13 +9,15 @@ const BaseUrl = 'https://sapphirejs.dev'; | |
const Email = '[email protected]'; | ||
const Title = 'Sapphire Framework'; | ||
|
||
/** @type {import('@docusaurus/types').Config} */ | ||
/** @type {import('@docusaurus/types').DocusaurusConfig} */ | ||
const config = { | ||
title: 'Sapphire', | ||
url: BaseUrl, | ||
baseUrl: '/', | ||
onBrokenLinks: 'warn', | ||
onBrokenMarkdownLinks: 'warn', | ||
// TODO: Re-enable after adding all JSON files. See temporary-errors-log-of-broken-links.md | ||
onBrokenLinks: 'ignore', | ||
// TODO: Re-enable after adding all JSON files. See temporary-errors-log-of-broken-links.md | ||
onBrokenMarkdownLinks: 'ignore', | ||
onDuplicateRoutes: 'warn', | ||
favicon: 'favicon.ico', | ||
tagline: Description, | ||
|
@@ -47,135 +49,6 @@ const config = { | |
} | ||
] | ||
} | ||
], | ||
[ | ||
'docusaurus-plugin-typedoc', | ||
{ | ||
id: 'framework', | ||
entryPoints: ['./projects/framework/src/index.ts'], | ||
tsconfig: './projects/framework/src/tsconfig.json', | ||
readme: 'none', | ||
out: 'Documentation/api-framework', | ||
plugin: ['typedoc-plugin-mdn-links', 'typedoc-plugin-djs-links'], | ||
sidebar: { | ||
categoryLabel: '@sapphire/framework', | ||
position: 0, | ||
fullNames: true | ||
} | ||
} | ||
], | ||
[ | ||
'docusaurus-plugin-typedoc', | ||
{ | ||
id: 'Pieces', | ||
entryPoints: ['./projects/pieces/src/index.ts'], | ||
tsconfig: './projects/pieces/src/tsconfig.json', | ||
readme: 'none', | ||
out: 'Documentation/api-pieces', | ||
plugin: ['typedoc-plugin-mdn-links'], | ||
sidebar: { | ||
categoryLabel: '@sapphire/pieces', | ||
position: 1, | ||
fullNames: true | ||
} | ||
} | ||
], | ||
[ | ||
'docusaurus-plugin-typedoc', | ||
{ | ||
id: 'Utilities', | ||
entryPointStrategy: 'resolve', | ||
entryPoints: [ | ||
'./projects/utilities/packages/async-queue/src/index.ts', | ||
'./projects/utilities/packages/bitfield/src/index.ts', | ||
'./projects/utilities/packages/cron/src/index.ts', | ||
'./projects/utilities/packages/decorators/src/index.ts', | ||
'./projects/utilities/packages/discord-utilities/src/index.ts', | ||
'./projects/utilities/packages/discord.js-utilities/src/index.ts', | ||
'./projects/utilities/packages/duration/src/index.ts', | ||
'./projects/utilities/packages/event-iterator/src/index.ts', | ||
'./projects/utilities/packages/fetch/src/index.ts', | ||
'./projects/utilities/packages/lexure/src/index.ts', | ||
'./projects/utilities/packages/node-utilities/src/index.ts', | ||
'./projects/utilities/packages/phisherman/src/index.ts', | ||
'./projects/utilities/packages/ratelimits/src/index.ts', | ||
'./projects/utilities/packages/result/src/index.ts', | ||
'./projects/utilities/packages/snowflake/src/index.ts', | ||
'./projects/utilities/packages/stopwatch/src/index.ts', | ||
'./projects/utilities/packages/time-utilities/src/index.ts', | ||
'./projects/utilities/packages/timer-manager/src/index.ts', | ||
'./projects/utilities/packages/timestamp/src/index.ts', | ||
'./projects/utilities/packages/utilities/src/index.ts' | ||
], | ||
tsconfig: './tsconfig.typedoc.json', | ||
readme: 'none', | ||
out: 'Documentation/api-utilities', | ||
plugin: ['typedoc-plugin-mdn-links', 'typedoc-plugin-djs-links'], | ||
sidebar: { | ||
categoryLabel: 'Sapphire Utilities', | ||
position: 2 | ||
} | ||
} | ||
], | ||
[ | ||
'docusaurus-plugin-typedoc', | ||
{ | ||
id: 'Plugins', | ||
entryPointStrategy: 'resolve', | ||
entryPoints: [ | ||
'./projects/plugins/packages/api/src/index.ts', | ||
'./projects/plugins/packages/editable-commands/src/index.ts', | ||
'./projects/plugins/packages/hmr/src/index.ts', | ||
'./projects/plugins/packages/i18next/src/index.ts', | ||
'./projects/plugins/packages/logger/src/index.ts', | ||
'./projects/plugins/packages/pattern-commands/src/index.ts', | ||
'./projects/plugins/packages/scheduled-tasks/src/index.ts', | ||
'./projects/plugins/packages/subcommands/src/index.ts', | ||
'./projects/plugins/packages/utilities-store/src/index.ts' | ||
], | ||
tsconfig: './tsconfig.typedoc.json', | ||
readme: 'none', | ||
out: 'Documentation/api-plugins', | ||
excludeExternals: true, | ||
externalPattern: ['node_modules/@types/**'], | ||
plugin: ['typedoc-plugin-mdn-links', 'typedoc-plugin-djs-links'], | ||
sidebar: { | ||
categoryLabel: 'Sapphire Plugins', | ||
position: 3 | ||
} | ||
} | ||
], | ||
[ | ||
'docusaurus-plugin-typedoc', | ||
{ | ||
id: 'Type', | ||
entryPoints: ['./projects/type/src/index.ts'], | ||
tsconfig: './projects/type/src/tsconfig.json', | ||
readme: './projects/type/README.md', | ||
out: 'Documentation/api-type', | ||
plugin: ['typedoc-plugin-mdn-links'], | ||
sidebar: { | ||
categoryLabel: '@sapphire/type', | ||
position: 4, | ||
fullNames: true | ||
} | ||
} | ||
], | ||
[ | ||
'docusaurus-plugin-typedoc', | ||
{ | ||
id: 'Shapeshift', | ||
entryPoints: ['./projects/shapeshift/src/index.ts'], | ||
tsconfig: './projects/shapeshift/src/tsconfig.json', | ||
readme: './projects/shapeshift/README.md', | ||
out: 'Documentation/api-shapeshift', | ||
plugin: ['typedoc-plugin-mdn-links'], | ||
sidebar: { | ||
categoryLabel: '@sapphire/shapeshift', | ||
position: 5, | ||
fullNames: true | ||
} | ||
} | ||
] | ||
], | ||
|
||
|
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,33 @@ | ||
{ | ||
"name": "json-parser", | ||
"version": "0.0.1", | ||
"description": "Parses API documentation from typedoc-json-parser to markdown files for Docusaurus.", | ||
"type": "module", | ||
"main": "dist/cli.mjs", | ||
"files": [ | ||
"dist/" | ||
], | ||
"scripts": { | ||
"build": "tsup", | ||
"debug": "node --inspect dist/cli.mjs", | ||
"start": "NODE_NO_WARNINGS=1 node dist/cli.mjs", | ||
"type-check": "tsc --noEmit" | ||
}, | ||
"dependencies": { | ||
"@sapphire/fetch": "^2.4.1", | ||
"@sapphire/result": "^2.6.1", | ||
"@sapphire/utilities": "^3.11.1", | ||
"colorette": "^2.0.19", | ||
"common-tags": "^1.8.2", | ||
"css": "^3.0.0", | ||
"typedoc-json-parser": "^7.2.0" | ||
}, | ||
"devDependencies": { | ||
"@docusaurus/types": "^2.4.0", | ||
"@types/common-tags": "^1.8.1", | ||
"dotenv": "^16.0.3", | ||
"esbuild-plugin-file-path-extensions": "^1.0.0", | ||
"tsup": "^6.7.0", | ||
"typescript": "^5.0.4" | ||
} | ||
} |
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,12 @@ | ||
#!/usr/bin/env node | ||
|
||
import { docusaurusTypeDocJsonParser } from './parser'; | ||
import { config } from 'dotenv'; | ||
import { URLSearchParams } from 'node:url'; | ||
|
||
config(); | ||
|
||
await docusaurusTypeDocJsonParser({ | ||
githubContentUrl: `https://api.github.com/repos/sapphiredev/docs/contents/docs?${new URLSearchParams({ ref: 'main' })}`, | ||
githubToken: process.env.GITHUB_TOKEN | ||
}); |
Oops, something went wrong.