mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat: rest docs (#7281)
This commit is contained in:
4
packages/rest/.gitignore
vendored
4
packages/rest/.gitignore
vendored
@@ -17,7 +17,9 @@ pids
|
||||
# Dist
|
||||
dist/
|
||||
typings/
|
||||
docs/
|
||||
docs/**/*
|
||||
!docs/index.yml
|
||||
!docs/README.md
|
||||
|
||||
# Miscellaneous
|
||||
.tmp/
|
||||
|
||||
1
packages/rest/docs/README.md
Normal file
1
packages/rest/docs/README.md
Normal file
@@ -0,0 +1 @@
|
||||
## [View the documentation here.](https://discord.js.org/#/docs/rest)
|
||||
5
packages/rest/docs/index.yml
Normal file
5
packages/rest/docs/index.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
- name: General
|
||||
files:
|
||||
- name: Welcome
|
||||
id: welcome
|
||||
path: ../../README.md
|
||||
@@ -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": {
|
||||
|
||||
7
packages/rest/scripts/docs.mjs
Normal file
7
packages/rest/scripts/docs.mjs
Normal 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',
|
||||
});
|
||||
Reference in New Issue
Block a user