Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CHA-188] Added typedoc to package reqs. #107

Merged
merged 11 commits into from
Apr 30, 2024
42 changes: 42 additions & 0 deletions .github/workflows/docks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: API Reference
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in the yaml file name :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry Andy, I think I'm being blind and can't see the issue? 🙈

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's called docks.yml rather than docs.yml :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You know, I think I might have taken a year to spot that, my brain simply wouldn't see it XD

on:
pull_request:
push:
branches:
- main
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest
permissions:
deployments: write
id-token: write
steps:
- uses: actions/checkout@v3

- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Install Package Dependencies
run: npm ci

- name: Build Documentation
run: npm run docs

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: eu-west-2
role-to-assume: arn:aws:iam::${{ secrets.ABLY_AWS_ACCOUNT_ID_SDK }}:role/ably-labs-sdk-builds-ably-chat-js
role-session-name: "${{ github.run_id }}-${{ github.run_number }}"

- name: Upload Documentation
uses: ably/sdk-upload-action@v1
splindsay-92 marked this conversation as resolved.
Show resolved Hide resolved
with:
sourcePath: typedoc/generated
githubToken: ${{ secrets.GITHUB_TOKEN }}
artifactName: typedoc
76 changes: 73 additions & 3 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"eslint-plugin-react-refresh": "^0.4.6",
"eslint-plugin-security": "^1.7.1",
"prettier": "^3.2.5",
"typedoc": "^0.25.13",
"typescript": "^5.4.5",
"vitest": "^1.4.0"
},
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"allowSyntheticDefaultImports": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"types": ["node"]
}
},
splindsay-92 marked this conversation as resolved.
Show resolved Hide resolved
}
25 changes: 25 additions & 0 deletions typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://typedoc.org/schema.json",
"entryPoints": ["src/index.ts"],
"out": "typedoc/generated",
"readme": "typedoc/landing-page.md",
"tsconfig": "tsconfig.base.json",
"treatWarningsAsErrors": false,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is set to false as we have a lot of things to fix documentation-wise, but I've added all the validation in anyway so when running it locally you can just flick the switch and see what needs to be fixed.

"includeVersion": true,
"validation": true,
"requiredToBeDocumented": [
"Accessor",
"Class",
"Constructor",
"Enum",
"EnumMember",
"Function",
"Interface",
"Method",
"Parameter",
"Property",
"TypeAlias",
"Variable",
"Namespace"
]
}
6 changes: 6 additions & 0 deletions typedoc/landing-page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ably Chat JavaScript Client Library SDK API Reference

The JavaScript Client Library SDK supports chat functionality over ably realtime. The JavaScript API references are generated from the [Ably Chat JavaScript Client Library SDK source code](https://github.com/ably-labs/ably-chat-js) using [TypeDoc](https://typedoc.org) and structured by classes.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The JavaScript Client Library SDK supports chat functionality over ably realtime. The JavaScript API references are generated from the [Ably Chat JavaScript Client Library SDK source code](https://github.com/ably-labs/ably-chat-js) using [TypeDoc](https://typedoc.org) and structured by classes.
The JavaScript Client Library SDK supports chat functionality over Ably. The JavaScript API references are generated from the [Ably Chat JavaScript Client Library SDK source code](https://github.com/ably-labs/ably-chat-js) using [TypeDoc](https://typedoc.org) and structured by classes.


The Chat SDK is built on top of the Ably Realtime SDK and provides a higher-level API for building chat applications. It includes features such as entering/leaving conversations, sending messages, room reactions, presence, typing indicators, and more.

Loading