Skip to content

Commit

Permalink
feat(docs): auto generate the api docs from darcjs
Browse files Browse the repository at this point in the history
  • Loading branch information
AGDholo committed May 8, 2023
1 parent 9e6fb35 commit 4d28721
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ darc-docs/.docusaurus

# Idea files
.idea/
darc-docs/build

# Darc docs Compiled output
darc-docs/build
darc-docs/static/api
14 changes: 14 additions & 0 deletions darc-docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,20 @@ const config = {
label: 'Docs',
to: '/docs/Overview',
},
{
type: 'dropdown',
label: 'API',
position: 'left',
items: [
{
label: 'Darcjs API',
href: '/api/darcjs/index.html',
prependBaseUrlToHref: true,
target: '_blank',
},
],
},

{
href: 'https://github.com/project-darc/darc',
label: 'GitHub',
Expand Down
9 changes: 7 additions & 2 deletions darc-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"prestart": "npm run generate:darcjs-api",
"start": "docusaurus start",
"prebuild": "npm run generate:darcjs-api",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
"write-heading-ids": "docusaurus write-heading-ids",
"generate:darcjs-api": "typedoc --out ../darc-docs/static/api/darcjs --entryPointStrategy expand ../darc-js/src --tsconfig ../darc-js/tsconfig.json --skipErrorChecking",
"postinstall": "npm run generate:darcjs-api"
},
"dependencies": {
"@docusaurus/core": "2.4.0",
Expand All @@ -26,7 +30,8 @@
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-icons": "^4.8.0",
"react-use": "^17.4.0"
"react-use": "^17.4.0",
"typedoc": "^0.24.7"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.4.0"
Expand Down
59 changes: 59 additions & 0 deletions darc-docs/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4d28721

Please sign in to comment.