Fix build issues
All checks were successful
Build and Deploy / build-and-deploy (push) Has been skipped

This commit is contained in:
thepaperpilot 2024-12-31 07:40:30 -06:00
parent bac570e78f
commit d6844a8bf5
2 changed files with 2 additions and 2 deletions

View file

@ -1,6 +1,6 @@
# Boards # Boards
The Board component allows you to make a pannable and zoomable "board" of components, called nodes. Instead of laying things out using the DOM, everything inside a board should be absolutely positioned. There are various utilities included in [board.tsx](/api/game/boards/board) to assist with implementing common behaviors with boards. Also, most of these code snippets are modified from [the demo project](https://code.incremental.social/profectus/Profectus-Demo/src/branch/main/src/data/layers/board.tsx), which may make a useful reference while implementing your own boards. The Board component allows you to make a pannable and zoomable "board" of components, called nodes. Instead of laying things out using the DOM, everything inside a board should be absolutely positioned. There are various utilities included in [board.tsx](/api/game/boards/board/) to assist with implementing common behaviors with boards. Also, most of these code snippets are modified from [the demo project](https://code.incremental.social/profectus/Profectus-Demo/src/branch/main/src/data/layers/board.tsx), which may make a useful reference while implementing your own boards.
To get started with a board, with a node that's just an upgrade locked to a specific location, it would look like this: To get started with a board, with a node that's just an upgrade locked to a specific location, it would look like this:

View file

@ -94,7 +94,7 @@ function sort(a, b) {
const fd = fs.openSync(filePath, "w+"); const fd = fs.openSync(filePath, "w+");
fs.writeSync(fd, frontmatter); fs.writeSync(fd, frontmatter);
if (dir.includes("components")) { if (dir.includes("components")) {
fs.writeSync(fd, `[Profectus](../../../index.md) / ${relPath.replaceAll("\\", "/").replaceAll("/components", "")} / ${path.basename(file).replace(".md", "")}\n\n`) fs.writeSync(fd, `[Profectus](${path.relative(dir, "./docs/api").replaceAll("\\", "/") + "/index.md"}) / ${relPath.replaceAll("\\", "/").replaceAll("/components", "")} / ${path.basename(file).replace(".md", "")}\n\n`)
} }
fs.writeSync(fd, data); fs.writeSync(fd, data);
fs.closeSync(fd); fs.closeSync(fd);