TypeDoc docs (GitHub Pages)

This commit is contained in:
MultiMote 2024-11-07 21:48:10 +03:00
parent d1686c8027
commit 70db143b6b
6 changed files with 76 additions and 7 deletions

67
.github/workflows/deploy-pages.yml vendored Normal file

@ -0,0 +1,67 @@
name: Deploy docs to Github Pages
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:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: yarn
cache-dependency-path: ./yarn.lock
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Install dependencies
run: yarn install
- name: Install typedoc
run: yarn add -D typedoc@0.26.11
- name: Build
run: yarn typedoc --treatValidationWarningsAsErrors --out docs src/*.ts
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

3
.gitignore vendored

@ -1,4 +1,5 @@
/.vscode
/dist
/node_modules
/yarn-error.log
/yarn-error.log
/docs

@ -109,7 +109,7 @@ export abstract class NiimbotAbstractClient extends EventEmitter<ClientEventMap>
/**
* Set interval for {@link startHeartbeat}.
*
* @param interval Heartbeat interval, default is 1000ms
* @param intervalMs Heartbeat interval, default is 1000ms
*/
public setHeartbeatInterval(intervalMs: number): void {
this.heartbeatIntervalMs = intervalMs;

@ -88,7 +88,7 @@ export enum PrinterInfoType {
LabelType = 3,
Language = 6,
AutoShutdownTime = 7,
/** See {@link PrinterId} */
/** See {@link PrinterModelId} */
PrinterModelId = 8,
SoftWareVersion = 9,
BatteryChargeLevel = 10,

@ -12,13 +12,13 @@ export type PrintOptions = {
/** How many pages will be printed */
totalPages: number;
/** Used in {@link waitForFinished} where status is received by polling */
/** Used in {@link AbstractPrintTask.waitForFinished} where status is received by polling */
statusPollIntervalMs: number;
/** Used in {@link waitForFinished} */
/** Used in {@link AbstractPrintTask.waitForFinished} */
statusTimeoutMs: number;
/** Used in {@link printPage} */
/** Used in {@link AbstractPrintTask.printPage} */
pageTimeoutMs: number;
};

@ -43,4 +43,5 @@ export const findPrintTask = (model: M, protocolVersion?: number): PrintTaskName
return foundExact ?? tasks.find((key) => modelPrintTasks[key]?.includes(model));
};
export { AbstractPrintTask } from "./AbstractPrintTask";
export { AbstractPrintTask, PrintOptions } from "./AbstractPrintTask";
export { B1PrintTask, B21V1PrintTask, D110PrintTask, OldD11PrintTask, V5PrintTask };