Skip to content

Commit

Permalink
refactor: switch to json based docs
Browse files Browse the repository at this point in the history
- feat: start setting up the plugin for parsing
- feat: start parsing classes
- chore: add actual words
- permalink: http://whatthecommit.com/3d6431a17a3b67e8b1341a2c6e4362f8
- chore: it's working!
- permalink: http://whatthecommit.com/8d8c1f3903766b8ef27575d63115cac6
- 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: i'll explain when you're older!
- permalink: http://whatthecommit.com/91a07064bb814666919304a00161fc6c
- chore: dope
- permalink: http://whatthecommit.com/bab00ed1aa0abb17cce41f36deea1607
- 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
  • Loading branch information
favna committed Oct 22, 2022
1 parent 81259b4 commit ce9880d
Show file tree
Hide file tree
Showing 79 changed files with 47,651 additions and 532 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/automatic-vercel-deploy.yml
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 }}
48 changes: 0 additions & 48 deletions .github/workflows/update-submodules.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ build/
.docusaurus/
.cache-loader/
docs/Documentation/
tsconfig.tsbuildinfo
*.tsbuildinfo

# misc
.DS_Store
Expand All @@ -32,3 +32,6 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
*.log

# TODO: Remove later
dist/
24 changes: 0 additions & 24 deletions .gitmodules

This file was deleted.

17 changes: 17 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"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}/docusaurus-discordjs-docgen",
"console": "internalConsole",
"outputCapture": "std",
"outFiles": ["${workspaceFolder}/docusaurus-discordjs-docgen/dist/**/*.js"]
}
]
}
44,646 changes: 44,646 additions & 0 deletions data/framework.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/General/Welcome.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ If you don't understand something in the documentation, you are experiencing pro
in the right direction, please don't hesitate to join our official
[Sapphire Community Server](https://sapphirejs.dev/discord).

[frameworksdocs]: ../Documentation/api-framework/
[frameworksdocs]: ../Documentation/sapphire-framework/General/welcome
[djs]: https://discord.js.org/
[saphfw]: https://github.com/sapphiredev/framework
[updating-guide]: ../Guide/getting-started/updating-from-v2-to-v3
2 changes: 1 addition & 1 deletion docs/Guide/arguments/built-in-arguments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ To facilitate creating commands and getting your bot running, Sapphire bundles a
[date]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
[dmchannel]: https://discord.js.org/#/docs/main/v13/class/DMChannel
[guildchannel]: https://discord.js.org/#/docs/main/v13/class/GuildChannel
[emojiobject]: ../../Documentation/api-framework/interfaces/EmojiObject
[emojiobject]: ../../Documentation/sapphire-framework/interfaces/EmojiObject
[guildmember]: https://discord.js.org/#/docs/main/v13/class/GuildMember
[mdn-date]:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#several_ways_to_create_a_date_object
Expand Down
6 changes: 3 additions & 3 deletions docs/Guide/arguments/using-arguments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ export class MathsCommand extends Command {

The code above matches any number of members up to 5, so it will never return an array of 6 or more.

[pick]: ../../Documentation/api-framework/classes/Args#pick
[rest]: ../../Documentation/api-framework/classes/Args#rest
[repeat]: ../../Documentation/api-framework/classes/Args#repeat
[pick]: ../../Documentation/sapphire-framework/class/Args#pick
[rest]: ../../Documentation/sapphire-framework/class/Args#rest
[repeat]: ../../Documentation/sapphire-framework/class/Args#repeat
[iterator]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators#iterators
[djs-slash-guide-options]: https://discordjs.guide/interactions/slash-commands.html#options
4 changes: 2 additions & 2 deletions docs/Guide/arguments/using-flags.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,5 @@ export class FlagsCommand extends Command {
}
```

[getflags]: ../../Documentation/api-framework/classes/Args#getflags
[rest]: ../../Documentation/api-framework/classes/Args#rest
[getflags]: ../../Documentation/sapphire-framework/class/Args#getflags
[rest]: ../../Documentation/sapphire-framework/class/Args#rest
8 changes: 4 additions & 4 deletions docs/Guide/arguments/using-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class OptionsCommand extends Command {
}
```

[getoption]: ../../Documentation/api-framework/classes/Args#getOption
[getoptions]: ../../Documentation/api-framework/classes/Args#getOptions
[pick]: ../../Documentation/api-framework/classes/Args#pick
[rest]: ../../Documentation/api-framework/classes/Args#rest
[getoption]: ../../Documentation/sapphire-framework/class/Args#getOption
[getoptions]: ../../Documentation/sapphire-framework/class/Args#getOptions
[pick]: ../../Documentation/sapphire-framework/class/Args#pick
[rest]: ../../Documentation/sapphire-framework/class/Args#rest
4 changes: 2 additions & 2 deletions docs/Guide/getting-started/creating-a-basic-command.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ For handling subcommands, please refer to the [Sapphire Plugin Subcommands][saph

:::

[command]: ../../Documentation/api-framework/classes/Command
[commandoptions]: ../../Documentation/api-framework/interfaces/CommandOptions
[command]: ../../Documentation/sapphire-framework/class/Command
[commandoptions]: ../../Documentation/sapphire-framework/interfaces/CommandOptions
[getting-started]: ./getting-started-with-sapphire
[load-message-commands-option]:
../../Documentation/api-framework/interfaces/SapphireClientOptions#loadmessagecommandlisteners
Expand Down
4 changes: 2 additions & 2 deletions docs/Guide/getting-started/getting-started-with-sapphire.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ And that's it for your `index.js` file! In the end, your directory should look l
└── index.js
```

[sapphire]: ../../Documentation/api-framework/classes/SapphireClient
[sapphire]: ../../Documentation/sapphire-framework/class/SapphireClient
[djs-client]: https://discord.js.org/#/docs/main/v13/class/Client
[baseuserdirectory]: ../../Documentation/api-framework/interfaces/SapphireClientOptions#baseuserdirectory
[baseuserdirectory]: ../../Documentation/sapphire-framework/interfaces/SapphireClientOptions#baseuserdirectory
[securing-your-token]: https://discordjs.guide/preparations/setting-up-a-bot-application.html#your-token
2 changes: 1 addition & 1 deletion docs/Guide/plugins/API/rate-limiting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@ export class UserRoute extends Route {

Now when a user gets rate limited they will receive a 429 error with a Retry-After header.

[rlm]: ../../../Documentation/api-utilities/classes/ratelimits_src.RateLimitManager
[rlm]: ../../../Documentation/sapphire-ratelimits/class/RateLimitManager
2 changes: 1 addition & 1 deletion docs/Guide/plugins/Logger/configuring-loglevel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ to `Warn` then logger will not log `Info` log messages.

:::

[sapphire]: ../../../Documentation/api-framework/classes/SapphireClient
[sapphire]: ../../../Documentation/sapphire-framework/class/SapphireClient
Loading

0 comments on commit ce9880d

Please sign in to comment.