Skip to content

Commit 5d028ab

Browse files
committed
Update build and install process to include Node.js
1 parent 87d5633 commit 5d028ab

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

.github/workflows/test.yml

+6
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,11 @@ jobs:
2424
uses: actions/setup-go@v5
2525
with:
2626
go-version-file: 'go.mod'
27+
- name: Install Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version-file: internal/ui/package.json
31+
- name: Build UI
32+
run: go generate ./internal/ui
2733
- name: Run tests
2834
run: go test -mod=readonly -race ./...

README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ Prerequisites:
5151

5252
- Knowledge of using the command-line for your OS (e.g. Terminal.app, Command Prompt, etc.)
5353
- [Go](https://go.dev/dl/) 1.24.0 or later.
54+
- [Node.js](https://nodejs.org/) 22.
5455

5556
### Linux
5657

5758
1. `sudo mkdir /zb && sudo chown $(id -u):$(id -g) /zb`
5859
2. Clone this repository to your computer and `cd` into it.
59-
3. `go build ./cmd/zb`
60+
3. `go generate ./internal/ui && go build ./cmd/zb`
6061
4. Start the build server (only on startup): `./zb serve --sandbox=0 &`
6162
5. Run a build: `./zb build --file demo/hello_linux.lua`
6263

@@ -66,7 +67,7 @@ You can use `./zb --help` to get more information on commands.
6667

6768
1. `mkdir $HOME/zb`
6869
2. Clone this repository to your computer and `cd` into it.
69-
3. `go build ./cmd/zb`
70+
3. `go generate ./internal/ui && go build ./cmd/zb`
7071
4. `export ZB_STORE_DIR="$HOME/zb/store" ZB_STORE_SOCKET="$HOME/zb/var/zb/server.sock"`
7172
5. Start the build server (only on startup): `./zb serve --sandbox=0 --db="$HOME/zb/var/zb/db.sqlite" &`
7273
6. Run a build: `./zb build --file demo/hello_macos.lua`
@@ -81,9 +82,10 @@ since zb depends on Windows support for Unix sockets.
8182
you can run `choco install mingw`.
8283
2. Create a `C:\zb` directory.
8384
3. Clone this repository to your computer and `cd` into it.
84-
4. `go build .\cmd\zb`
85-
5. Start the build server in one terminal: `.\zb.exe serve`
86-
6. Run a build in another terminal: `.\zb.exe build --file demo/hello_windows.lua`
85+
4. `go generate .\internal\ui`
86+
5. `go build .\cmd\zb`
87+
6. Start the build server in one terminal: `.\zb.exe serve`
88+
7. Run a build in another terminal: `.\zb.exe build --file demo/hello_windows.lua`
8789

8890
### Next Steps
8991

internal/ui/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
"url": "https://github.com/256lights/zb/issues"
2323
},
2424
"homepage": "https://github.com/256lights/zb#readme",
25+
"engines": {
26+
"node": "~22.13.1"
27+
},
2528
"dependencies": {
2629
"@hotwired/stimulus": "^3.2.2",
2730
"@hotwired/turbo": "^8.0.13",

0 commit comments

Comments
 (0)