From 49dc8c0a241c33a53f0ed7f369d7e31b012eb1c5 Mon Sep 17 00:00:00 2001 From: bakedpotatolord Date: Wed, 18 Jun 2025 16:59:51 -0600 Subject: [PATCH 1/6] fix broken formatting --- docs/kiri-moto/engine-apis.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/kiri-moto/engine-apis.md b/docs/kiri-moto/engine-apis.md index 54d93d59..cd3eaf2e 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` | @@ -43,12 +43,13 @@ you can view some example of how to use the engine [here](https://grid.space/kir If a listener is set via `setListener(fn)`, it will be called with events such as: -- `{ loaded, vertices }` — when an STL file is loaded -- `{ parsed, vertices }` — when raw data is parsed -- `{ slice: msg }` — when slicing is complete -- `{ prepare: { update } }` — during toolpath preparation -- `{ prepare: { done: true } }` — when preparation is complete -- `{ export: { segment } }` — during G-code segment export -- `{ export: { done } }` — when export is finished +- `{ loaded, vertices }` — when an STL file is loaded +- `{ parsed, vertices }` — when raw data is parsed +- `{ slice: msg }` — when slicing is complete +- `{ prepare: { update } }` — during toolpath preparation +- `{ prepare: { done: true } }` — when preparation is complete +- `{ export: { segment } }` — during G-code segment export +- `{ export: { done } }` — when export is finished These allow for building progress indicators or responding to processing stages. + From 8f741b251a54a62fb4c9aa1162b838f6b6955f9b Mon Sep 17 00:00:00 2001 From: bakedpotatolord Date: Wed, 18 Jun 2025 17:07:32 -0600 Subject: [PATCH 2/6] add prettier and docs-check script --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index a910ed19..63658bd8 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": { From 8a31b3bc50c5368f36b715c4ae3810e542f9a7f4 Mon Sep 17 00:00:00 2001 From: bakedpotatolord Date: Wed, 18 Jun 2025 17:07:54 -0600 Subject: [PATCH 3/6] run formatter --- docs/kiri-moto/engine-apis.md | 15 +++++----- docs/mesh-tool.md | 2 +- docs/sidebars.js | 54 ++++++++++++++++------------------- 3 files changed, 33 insertions(+), 38 deletions(-) diff --git a/docs/kiri-moto/engine-apis.md b/docs/kiri-moto/engine-apis.md index cd3eaf2e..58746409 100644 --- a/docs/kiri-moto/engine-apis.md +++ b/docs/kiri-moto/engine-apis.md @@ -43,13 +43,12 @@ you can view some example of how to use the engine [here](https://grid.space/kir If a listener is set via `setListener(fn)`, it will be called with events such as: -- `{ loaded, vertices }` — when an STL file is loaded -- `{ parsed, vertices }` — when raw data is parsed -- `{ slice: msg }` — when slicing is complete -- `{ prepare: { update } }` — during toolpath preparation -- `{ prepare: { done: true } }` — when preparation is complete -- `{ export: { segment } }` — during G-code segment export -- `{ export: { done } }` — when export is finished +- `{ loaded, vertices }` — when an STL file is loaded +- `{ parsed, vertices }` — when raw data is parsed +- `{ slice: msg }` — when slicing is complete +- `{ prepare: { update } }` — during toolpath preparation +- `{ prepare: { done: true } }` — when preparation is complete +- `{ export: { segment } }` — during G-code segment export +- `{ export: { done } }` — when export is finished These allow for building progress indicators or responding to processing stages. - 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; - From e3fe1bfca9a577dca234a371d4cf3fc11848cab2 Mon Sep 17 00:00:00 2001 From: bakedpotatolord Date: Wed, 18 Jun 2025 17:09:12 -0600 Subject: [PATCH 4/6] add docs format gh action --- .github/workflows/prettier-check.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/prettier-check.yml diff --git a/.github/workflows/prettier-check.yml b/.github/workflows/prettier-check.yml new file mode 100644 index 00000000..725afb3c --- /dev/null +++ b/.github/workflows/prettier-check.yml @@ -0,0 +1,21 @@ +name: 'Docs Fomatting Check' +on: + push: + workflow_dispatch: + +jobs: + build-and-publish: + 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 From e0baa682d7c7f870d6eb5fdb84fdb243ef587eda Mon Sep 17 00:00:00 2001 From: bakedpotatolord Date: Wed, 18 Jun 2025 17:10:24 -0600 Subject: [PATCH 5/6] fix job name --- .github/workflows/prettier-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prettier-check.yml b/.github/workflows/prettier-check.yml index 725afb3c..1f886297 100644 --- a/.github/workflows/prettier-check.yml +++ b/.github/workflows/prettier-check.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: jobs: - build-and-publish: + format-check: runs-on: ubuntu-latest steps: From 571e99c8622991acce327fd7d35b6ffb8c0848bd Mon Sep 17 00:00:00 2001 From: bakedpotatolord Date: Wed, 18 Jun 2025 17:14:33 -0600 Subject: [PATCH 6/6] change to only run on docs pushes --- .github/workflows/prettier-check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/prettier-check.yml b/.github/workflows/prettier-check.yml index 1f886297..90dfe288 100644 --- a/.github/workflows/prettier-check.yml +++ b/.github/workflows/prettier-check.yml @@ -1,6 +1,8 @@ name: 'Docs Fomatting Check' on: push: + paths: + - './docs/**' workflow_dispatch: jobs: