Skip to content

Commit 9009e83

Browse files
authored
chore: update build paths and improve project structure (#79)
1 parent bdcd1aa commit 9009e83

File tree

10 files changed

+19
-13
lines changed

10 files changed

+19
-13
lines changed

.moon/tasks/tag-trunk.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ tasks:
44
serve:
55
command: trunk serve
66
local: true
7-
mkDist:
8-
command: mkdir -p dist/apps
7+
mkTarget:
8+
command: mkdir -p target/apps
99
build:
1010
command: trunk
1111
args:
@@ -19,4 +19,4 @@ tasks:
1919
- "*.html"
2020
- "*.toml"
2121
deps:
22-
- mkDist
22+
- mkTarget

.moon/toolchain.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ node:
2121
rust:
2222
syncToolchainConfig: true
2323
bins:
24-
- trunk@0.21.5
24+
- trunk@0.21.14
2525
targets:
2626
- wasm32-unknown-unknown
2727
components:

.prototools

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ go = "^1"
33
moon = "^1"
44
node = "^22"
55
yarn = "^4"
6-
rust = "^1"
6+
rust = "^1.88"
77

88
[plugins]
99
dagger = "source:https://raw.githubusercontent.com/Phault/proto-toml-plugins/main/dagger/plugin.toml"

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[workspace]
2+
resolver = "3"
23
members = ["apps/counter"]
34
[workspace.package]
45
edition = "2024"

apps/app/src/hooks/use-apps.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ export const useProjects = () =>
1111
title: "Wasm Counter",
1212
url: "/apps/counter",
1313
},
14+
{
15+
description:
16+
"An MCP Server that enables AI assistants to interact with your local browsers.",
17+
title: "MCP Browser Kit",
18+
url: "https://github.com/ndthanhdev/mcp-browser-kit",
19+
},
1420
] satisfies Project[],
1521
[],
1622
);

apps/counter/Trunk.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[build]
22
filehash = false
33
public_url = "/apps/counter/"
4-
dist = "dist/apps/counter/"
4+
dist = "target/apps/counter/"

apps/counter/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl Counter {
4343
fn view(&self) -> Column<Message> {
4444
column![row![
4545
button("Decrement").on_press(Message::Decrement),
46-
text(self.value).size(50),
46+
text(self.value).size(50).align_x(iced::alignment::Horizontal::Center).width(100),
4747
button("Increment").on_press(Message::Increment)
4848
]
4949
.spacing(20)

etc/scripts/actions/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ await $`moon run app:build`;
2020

2121
await $`moon run counter:build`;
2222

23-
await fs.copy(workDirs.apps.counter.dist.path, workDirs.apps.app.public.path);
23+
await fs.copy(workDirs.apps.counter.target.path, workDirs.apps.app.public.path);

etc/scripts/utils/work-dirs.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ export const workDirs = {
2525
},
2626
},
2727
counter: {
28-
dist: {
28+
path: counter,
29+
target: {
2930
apps: {
30-
path: path.resolve(counter, "dist/apps"),
31+
path: path.resolve(counter, "target/apps"),
3132
},
32-
path: path.resolve(counter, "dist"),
33+
path: path.resolve(counter, "target"),
3334
},
34-
path: counter,
3535
},
3636
path: apps,
3737
},

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@
9393
"zustand": "^4.5.6",
9494
"zx": "^8.3.0"
9595
},
96-
"packageManager": "yarn@4.6.0",
9796
"engines": {
9897
"node": "22.12.0"
9998
}

0 commit comments

Comments
 (0)