Skip to content

Commit

Permalink
[FCE-352] Add typedoc (#48)
Browse files Browse the repository at this point in the history
## Description

Add basic documentation, available
[here](https://fishjam-cloud.github.io/web-client-sdk/).

Docs will rebuild with each PR


## Motivation and Context

Let's have some basic docs for project

## Types of changes

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to
      not work as expected)
  • Loading branch information
mironiasty authored Aug 1, 2024
1 parent f21d553 commit 659f98d
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 9 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy TypeDocs as static page

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install node dependencies
run: yarn
- name: Build project
run: yarn build
- name: Run typedoc
run: yarn docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: "docs"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ React and TypeScript client libraries for [Fishjam Cloud](https://cloud.fishjam.

To install SDK you can use `npm` or `yarn` commands:

## Documentation

API documentation is available [here](https://fishjam-cloud.github.io/web-client-sdk/)

### React Library:

React library is useful for projects that uses React. It is wrapper over TypeScript library, that provides React
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"format": "yarn workspaces foreach -A -p run format",
"format:check": "yarn workspaces foreach -A -p run format:check",
"lint": "yarn workspaces foreach -A -p run lint",
"lint:check": "yarn workspaces foreach -A -p run lint:check"
"lint:check": "yarn workspaces foreach -A -p run lint:check",
"docs": "typedoc"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.18.0",
Expand All @@ -30,6 +31,8 @@
"eslint-plugin-react-refresh": "^0.4.9",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.5",
"typedoc": "^0.26.5",
"typedoc-material-theme": "^1.1.0",
"typescript": "^5.5.4"
}
}
4 changes: 3 additions & 1 deletion packages/react-client/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"plugin": ["typedoc-plugin-mdn-links"]
"$schema": "https://typedoc.org/schema.json",
"includeVersion": true,
"entryPoints": ["src/index.ts"]
}
10 changes: 3 additions & 7 deletions packages/ts-client/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"plugin": ["typedoc-plugin-mdn-links", "typedoc-plugin-external-resolver"],
"visibilityFilters": {
"protected": false,
"private": false,
"inherited": true,
"external": true
}
"$schema": "https://typedoc.org/schema.json",
"includeVersion": true,
"entryPoints": ["src/index.ts"]
}
8 changes: 8 additions & 0 deletions typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"entryPoints": ["packages/*"],
"name": "Fishjam Cloud Web SDK",
"entryPointStrategy": "packages",
"includeVersion": true,
"plugin": ["typedoc-material-theme"],
"themeColor": "#FCF6E7"
}
20 changes: 20 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,13 @@ __metadata:
languageName: node
linkType: hard

"@material/material-color-utilities@npm:^0.2.7":
version: 0.2.7
resolution: "@material/material-color-utilities@npm:0.2.7"
checksum: 10c0/7734f8d7cffe6a92d47fcca82b4846e39ffd79be9c057f3299466696dcdee5379b8a8a3aa6a9692d40bd6900905f689105d9a8ce47882ab22348df10621f70cd
languageName: node
linkType: hard

"@nodelib/fs.scandir@npm:2.1.5":
version: 2.1.5
resolution: "@nodelib/fs.scandir@npm:2.1.5"
Expand Down Expand Up @@ -2900,6 +2907,8 @@ __metadata:
eslint-plugin-react-refresh: "npm:^0.4.9"
prettier: "npm:^3.3.3"
prettier-plugin-tailwindcss: "npm:^0.6.5"
typedoc: "npm:^0.26.5"
typedoc-material-theme: "npm:^1.1.0"
typescript: "npm:^5.5.4"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -5573,6 +5582,17 @@ __metadata:
languageName: node
linkType: hard

"typedoc-material-theme@npm:^1.1.0":
version: 1.1.0
resolution: "typedoc-material-theme@npm:1.1.0"
dependencies:
"@material/material-color-utilities": "npm:^0.2.7"
peerDependencies:
typedoc: ^0.25.13 || ^0.26.3
checksum: 10c0/523bd30b3a13b47e29d20d2f72abdde80f1b15bbd9c6012777edc29e4c0fc8b76fdfdece8c543d5942f6ac7db62c14d90e4872c31490a98815c3919771104527
languageName: node
linkType: hard

"typedoc-plugin-external-resolver@npm:^1.0.3":
version: 1.0.3
resolution: "typedoc-plugin-external-resolver@npm:1.0.3"
Expand Down

0 comments on commit 659f98d

Please sign in to comment.