Merge pull request #390 from GridSpace/docs

fix a docs formatting error, and add docs formatting check GH action
This commit is contained in:
Josiah Hamm 2025-06-18 17:22:27 -06:00 committed by GitHub
commit c8d72a2d79
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 54 additions and 33 deletions

23
.github/workflows/prettier-check.yml vendored Normal file
View file

@ -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

View file

@ -16,13 +16,13 @@ you can view some example of how to use the engine [here](https://grid.space/kir
## Methods ## Methods
| Method | Description | Returns | | Method | Description | Returns |
| --------------------------- | -------------------------------------------------------------------------------------------------------------- | ----------------- | ------- | ------- | -------- | | --------------------------- | -------------------------------------------------------------------------------------------------------------- | ----------------- |
| `load(url)` | Loads an [STL](<https://en.wikipedia.org/wiki/STL_(file_format)>) file from a given URL and centers the model. | `Promise<Engine>` | | `load(url)` | Loads an [STL](<https://en.wikipedia.org/wiki/STL_(file_format)>) file from a given URL and centers the model. | `Promise<Engine>` |
| `clear()` | Clears all objects from workspace. | `void` | | `clear()` | Clears all objects from workspace. | `void` |
| `parse(data)` | Parses raw [STL](<https://en.wikipedia.org/wiki/STL_(file_format)>) data and loads it as a centered widget. | `Promise<Engine>` | | `parse(data)` | Parses raw [STL](<https://en.wikipedia.org/wiki/STL_(file_format)>) data and loads it as a centered widget. | `Promise<Engine>` |
| `setListener(listener)` | Sets an event listener function to receive engine progress updates | `Engine` | | `setListener(listener)` | Sets an event listener function to receive engine progress updates | `Engine` |
| `setRender(bool)` | Enables or disables rendering. | `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` | | `setDevice(device)` | Merges a custom device profile into the current settings. | `Engine` |
| `setProcess(process)` | Merges custom slicing process parameters. | `Engine` | | `setProcess(process)` | Merges custom slicing process parameters. | `Engine` |
| `setController(controller)` | Sets the slicing controller settings and starts/stops the worker pool accordingly. | `Engine` | | `setController(controller)` | Sets the slicing controller settings and starts/stops the worker pool accordingly. | `Engine` |

View file

@ -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](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 Browse the Mesh:Tool [video playlist](https://www.youtube.com/playlist?list=PLRoVgyRoWZps84Scj5wQ2LYK-wMu-7r0L) on YouTube

View file

@ -3,7 +3,6 @@ const sidebars = {
{ {
type: "doc", type: "doc",
id: "index", id: "index",
}, },
{ {
type: "category", type: "category",
@ -14,8 +13,8 @@ const sidebars = {
type: "category", type: "category",
label: "Kiri Moto", label: "Kiri Moto",
link: { link: {
type: 'doc', type: "doc",
id: 'kiri-moto/index', id: "kiri-moto/index",
}, },
items: [ items: [
"kiri-moto/interface", "kiri-moto/interface",
@ -31,17 +30,17 @@ const sidebars = {
{ {
type: "category", type: "category",
label: "CAM Mode", label: "CAM Mode",
link:{ link: {
type: 'doc', type: "doc",
id: 'kiri-moto/CAM/index', id: "kiri-moto/CAM/index",
}, },
items:[ items: [
"kiri-moto/CAM/processOpts", "kiri-moto/CAM/processOpts",
"kiri-moto/CAM/machines", "kiri-moto/CAM/machines",
"kiri-moto/CAM/tools", "kiri-moto/CAM/tools",
"kiri-moto/CAM/ops", "kiri-moto/CAM/ops",
], ],
} },
], ],
}, },
{ {
@ -52,39 +51,37 @@ const sidebars = {
type: "category", type: "category",
label: "GridBot", label: "GridBot",
link: { link: {
type: 'doc', type: "doc",
id: 'gridbot/index', id: "gridbot/index",
}, },
items: [ items: ["gridbot/bom"],
"gridbot/bom", },
]
}
], ],
}, },
{ {
type: 'category', type: "category",
label: 'Community', label: "Community",
collapsed: false, collapsed: false,
items: [ items: [
{ {
type: 'link', type: "link",
label: 'Forums', label: "Forums",
href: 'https://forum.grid.space', href: "https://forum.grid.space",
}, },
{ {
type: 'link', type: "link",
label: 'Discord', label: "Discord",
href: 'https://discord.gg/suyCCgr', href: "https://discord.gg/suyCCgr",
}, },
{ {
type: 'link', type: "link",
label: 'GitHub', label: "GitHub",
href: 'https://github.com/GridSpace/grid-apps', href: "https://github.com/GridSpace/grid-apps",
}, },
{ {
type: 'link', type: "link",
label: 'BlueSky', label: "BlueSky",
href: 'https://bsky.app/profile/grid.space', href: "https://bsky.app/profile/grid.space",
}, },
], ],
}, },
@ -104,4 +101,3 @@ const sidebars = {
}; };
module.exports = sidebars; module.exports = sidebars;

View file

@ -50,6 +50,7 @@
"jszip": "^3.7.1", "jszip": "^3.7.1",
"manifold-3d": "^2.5.1", "manifold-3d": "^2.5.1",
"moment": "^2.29.4", "moment": "^2.29.4",
"prettier": "^3.5.3",
"react-responsive-carousel": "^3.2.23", "react-responsive-carousel": "^3.2.23",
"serve-static": "^1.14.1", "serve-static": "^1.14.1",
"three": "^0.174.0", "three": "^0.174.0",
@ -98,7 +99,8 @@
"preinstall": "node bin/install-pre.js && npx webpack --config bin/webpack-three.js", "preinstall": "node bin/install-pre.js && npx webpack --config bin/webpack-three.js",
"docs-dev": "docusaurus start", "docs-dev": "docusaurus start",
"docs-build": "docusaurus build", "docs-build": "docusaurus build",
"docs-serve": "docusaurus serve" "docs-serve": "docusaurus serve",
"docs-check": "prettier ./docs --check"
}, },
"main": "app-el.js", "main": "app-el.js",
"build": { "build": {