diff --git a/.github/workflows/prettier-check.yml b/.github/workflows/prettier-check.yml new file mode 100644 index 00000000..90dfe288 --- /dev/null +++ b/.github/workflows/prettier-check.yml @@ -0,0 +1,23 @@ +name: 'Docs Fomatting Check' +on: + push: + paths: + - './docs/**' + workflow_dispatch: + +jobs: + format-check: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + - name: Install dependencies + run: bun install + - name: check format for docs + run: + bun docs-check diff --git a/docs/kiri-moto/engine-apis.md b/docs/kiri-moto/engine-apis.md index 54d93d59..58746409 100644 --- a/docs/kiri-moto/engine-apis.md +++ b/docs/kiri-moto/engine-apis.md @@ -16,13 +16,13 @@ you can view some example of how to use the engine [here](https://grid.space/kir ## Methods | Method | Description | Returns | -| --------------------------- | -------------------------------------------------------------------------------------------------------------- | ----------------- | ------- | ------- | -------- | +| --------------------------- | -------------------------------------------------------------------------------------------------------------- | ----------------- | | `load(url)` | Loads an [STL]() file from a given URL and centers the model. | `Promise` | | `clear()` | Clears all objects from workspace. | `void` | | `parse(data)` | Parses raw [STL]() data and loads it as a centered widget. | `Promise` | | `setListener(listener)` | Sets an event listener function to receive engine progress updates | `Engine` | | `setRender(bool)` | Enables or disables rendering. | `Engine` | -| `setMode(mode)` | Sets the slicing mode where mode is "CAM" | "FDM" | "LASER" | "SLA" . | `Engine` | +| `setMode(mode)` | Sets the slicing mode where mode is "CAM" \| "FDM" \| "LASER" \| "SLA" . | `Engine` | | `setDevice(device)` | Merges a custom device profile into the current settings. | `Engine` | | `setProcess(process)` | Merges custom slicing process parameters. | `Engine` | | `setController(controller)` | Sets the slicing controller settings and starts/stops the worker pool accordingly. | `Engine` | diff --git a/docs/mesh-tool.md b/docs/mesh-tool.md index 0aeb299f..fba30fb9 100644 --- a/docs/mesh-tool.md +++ b/docs/mesh-tool.md @@ -10,7 +10,7 @@ id: mesh-tool [Mesh:Tool](https://grid.space/mesh) is an intentionally simplified tool designed to address the most common cases of mesh editing and repair. It is under active development with new features daily or weekly. This means the docs can get out of date quickly. -Mesh:Tool is part of the [Grid.Apps GitHub Repo](https://github.com/GridSpace/grid-apps) and is Open Source under the [MIT License](https://en.wikipedia.org/wiki/MIT\_License). It runs entirely in browser, is not connected to the cloud, and does not collect or share any model data. [Desktop builds](https://github.com/GridSpace/grid-apps/releases) are available whiel start in the Slicer view. Use the central drop-menu to switch to Mesh:Tool. +Mesh:Tool is part of the [Grid.Apps GitHub Repo](https://github.com/GridSpace/grid-apps) and is Open Source under the [MIT License](https://en.wikipedia.org/wiki/MIT_License). It runs entirely in browser, is not connected to the cloud, and does not collect or share any model data. [Desktop builds](https://github.com/GridSpace/grid-apps/releases) are available whiel start in the Slicer view. Use the central drop-menu to switch to Mesh:Tool. Browse the Mesh:Tool [video playlist](https://www.youtube.com/playlist?list=PLRoVgyRoWZps84Scj5wQ2LYK-wMu-7r0L) on YouTube diff --git a/docs/sidebars.js b/docs/sidebars.js index 968fda51..429f8036 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -3,7 +3,6 @@ const sidebars = { { type: "doc", id: "index", - }, { type: "category", @@ -14,8 +13,8 @@ const sidebars = { type: "category", label: "Kiri Moto", link: { - type: 'doc', - id: 'kiri-moto/index', + type: "doc", + id: "kiri-moto/index", }, items: [ "kiri-moto/interface", @@ -31,17 +30,17 @@ const sidebars = { { type: "category", label: "CAM Mode", - link:{ - type: 'doc', - id: 'kiri-moto/CAM/index', + link: { + type: "doc", + id: "kiri-moto/CAM/index", }, - items:[ + items: [ "kiri-moto/CAM/processOpts", "kiri-moto/CAM/machines", "kiri-moto/CAM/tools", "kiri-moto/CAM/ops", ], - } + }, ], }, { @@ -52,39 +51,37 @@ const sidebars = { type: "category", label: "GridBot", link: { - type: 'doc', - id: 'gridbot/index', + type: "doc", + id: "gridbot/index", }, - items: [ - "gridbot/bom", - ] - } + items: ["gridbot/bom"], + }, ], }, { - type: 'category', - label: 'Community', + type: "category", + label: "Community", collapsed: false, items: [ { - type: 'link', - label: 'Forums', - href: 'https://forum.grid.space', + type: "link", + label: "Forums", + href: "https://forum.grid.space", }, { - type: 'link', - label: 'Discord', - href: 'https://discord.gg/suyCCgr', + type: "link", + label: "Discord", + href: "https://discord.gg/suyCCgr", }, { - type: 'link', - label: 'GitHub', - href: 'https://github.com/GridSpace/grid-apps', + type: "link", + label: "GitHub", + href: "https://github.com/GridSpace/grid-apps", }, { - type: 'link', - label: 'BlueSky', - href: 'https://bsky.app/profile/grid.space', + type: "link", + label: "BlueSky", + href: "https://bsky.app/profile/grid.space", }, ], }, @@ -104,4 +101,3 @@ const sidebars = { }; module.exports = sidebars; - diff --git a/package.json b/package.json index a02d484a..337d9075 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "jszip": "^3.7.1", "manifold-3d": "^2.5.1", "moment": "^2.29.4", + "prettier": "^3.5.3", "react-responsive-carousel": "^3.2.23", "serve-static": "^1.14.1", "three": "^0.174.0", @@ -98,7 +99,8 @@ "preinstall": "node bin/install-pre.js && npx webpack --config bin/webpack-three.js", "docs-dev": "docusaurus start", "docs-build": "docusaurus build", - "docs-serve": "docusaurus serve" + "docs-serve": "docusaurus serve", + "docs-check": "prettier ./docs --check" }, "main": "app-el.js", "build": {