feat: rest docs (#7281)

This commit is contained in:
Jan
2022-01-17 10:56:48 +01:00
committed by GitHub
parent ecf2430f6e
commit 9054f2f7ad
6 changed files with 20 additions and 2 deletions

View File

@@ -62,7 +62,7 @@ jobs:
max-parallel: 1
fail-fast: false
matrix:
package: ['builders', 'collection', 'discord.js', 'voice']
package: ['builders', 'collection', 'discord.js', 'rest', 'voice']
runs-on: ubuntu-latest
env:
BRANCH_NAME: ${{ needs.build.outputs.BRANCH_NAME }}

View File

@@ -17,7 +17,9 @@ pids
# Dist
dist/
typings/
docs/
docs/**/*
!docs/index.yml
!docs/README.md
# Miscellaneous
.tmp/

View File

@@ -0,0 +1 @@
## [View the documentation here.](https://discord.js.org/#/docs/rest)

View File

@@ -0,0 +1,5 @@
- name: General
files:
- name: Welcome
id: welcome
path: ../../README.md

View File

@@ -7,6 +7,7 @@
"test": "jest --pass-with-no-tests --collect-coverage",
"lint": "prettier --check . && eslint src __tests__ --ext mjs,js,ts",
"format": "prettier --write . && eslint src __tests__ --ext mjs,js,ts --fix",
"docs": "typedoc --json docs/typedoc-out.json src/index.ts && node scripts/docs.mjs",
"prepublishOnly": "yarn build && yarn lint && yarn test",
"changelog": "git cliff --prepend ./CHANGELOG.md -l -c ../../cliff.toml -r ../../ --include-path './*'"
},
@@ -61,6 +62,7 @@
"@babel/plugin-proposal-decorators": "^7.16.7",
"@babel/preset-env": "^7.16.8",
"@babel/preset-typescript": "^7.16.7",
"@discordjs/ts-docgen": "^0.3.4",
"@types/jest": "^27.4.0",
"@types/node-fetch": "^2.5.10",
"@typescript-eslint/eslint-plugin": "^5.9.1",
@@ -75,6 +77,7 @@
"nock": "^13.2.1",
"prettier": "^2.5.1",
"tsup": "^5.11.11",
"typedoc": "^0.22.10",
"typescript": "^4.5.4"
},
"engines": {

View File

@@ -0,0 +1,7 @@
import { runGenerator } from '@discordjs/ts-docgen';
runGenerator({
existingOutput: 'docs/typedoc-out.json',
custom: 'docs/index.yml',
output: 'docs/docs.json',
});