Skip to content

Commit

Permalink
Install typedoc to generate documentation for project
Browse files Browse the repository at this point in the history
- [x] Install typedoc
- [x] Publish documentation to github pages
  • Loading branch information
kitsuyui committed Oct 10, 2023
1 parent b465c5a commit b2cb954
Show file tree
Hide file tree
Showing 5 changed files with 3,028 additions and 949 deletions.
6 changes: 6 additions & 0 deletions .config/typedoc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import('typedoc').TypeDocOptions} */
module.exports = {
entryPoints: ['../src/**/*.ts'],
exclude: ['../src/**/*+(.test).ts'],
out: '../build/doc',
}
35 changes: 35 additions & 0 deletions .github/workflows/typedoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish Typedoc

on:
push:
branches:
- typedoc
# branches:
# - main

jobs:
deploy:
name: Publish Typedoc
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2.4.0
with:
version: 8

- uses: actions/setup-node@v3
with:
node-version: 20.x

- run: pnpm install

- run: pnpm build

- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/docs
cname: ts-playground.typedoc.kitsuyui.com
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
coverage
dist
node_modules
build/docs
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
"build:standalone:win-x64": "pkg dist/main.js -o build/ts-playground-win-x64 -t node18-win-x64 --no-signature",
"build:standalone:linux-arm64": "pkg dist/main.js -o build/ts-playground-linux-arm64 -t node18-linux-arm64 --no-signature",
"build:standalone:linux-x64": "pkg dist/main.js -o build/ts-playground-linux-x64 -t node18-linux-x64 --no-signature",
"build:all": "pnpm build:lib && pnpm build:bin && pnpm build:standalone:macos-arm64 && pnpm build:standalone:macos-x64 && pnpm build:standalone:win-arm64 && pnpm build:standalone:win-x64 && pnpm build:standalone:linux-arm64 && pnpm build:standalone:linux-x64",
"build:all": "pnpm build:lib && pnpm build:bin && pnpm build:standalone:macos-arm64 && pnpm build:standalone:macos-x64 && pnpm build:standalone:win-arm64 && pnpm build:standalone:win-x64 && pnpm build:standalone:linux-arm64 && pnpm build:standalone:linux-x64 && pnpm typedoc",
"dev:lib": "tsup src/index.ts --dts --format cjs,esm --minify --clean --sourcemap --watch --onSuccess 'node dist/index.js'",
"dev:bin": "tsup src/main.ts --dts --format cjs,esm --minify --clean --sourcemap --watch --onSuccess 'node dist/main.js'",
"test": "jest --coverage",
"lint": "eslint --ext .ts src",
"format": "prettier --write ."
"format": "prettier --write .",
"typedoc": "typedoc"
},
"bin": {
"ts-playground-main": "./dist/main.js"
Expand All @@ -39,6 +40,7 @@
"package.json"
],
"devDependencies": {
"@jest/globals": "^29.7.0",
"@swc/core": "^1.3.62",
"@swc/jest": "^0.2.26",
"@typescript-eslint/eslint-plugin": "^6.0.0",
Expand All @@ -51,6 +53,7 @@
"jest": "^29.5.0",
"pkg": "^5.8.1",
"prettier": "^3.0.0",
"typedoc": "^0.25.2",
"typescript": "^5.1.3"
},
"dependencies": {
Expand Down
Loading

0 comments on commit b2cb954

Please sign in to comment.