diff options
| author | Adam Mathes <adam@adammathes.com> | 2026-02-13 22:14:30 -0800 |
|---|---|---|
| committer | Adam Mathes <adam@adammathes.com> | 2026-02-13 22:14:30 -0800 |
| commit | 47c43577ead8721008b858232511b2f65e0ed574 (patch) | |
| tree | a15d1a4a4bb64b4b7d3de650b306835d8d7f63a5 /README.md | |
| parent | 76cb9c2a39d477a64824a985ade40507e3bbade1 (diff) | |
| download | neko-47c43577ead8721008b858232511b2f65e0ed574.tar.gz neko-47c43577ead8721008b858232511b2f65e0ed574.tar.bz2 neko-47c43577ead8721008b858232511b2f65e0ed574.zip | |
Optimize asset packaging: move UI assets to root dist/ and decouple rice embedding
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 32 |
1 files changed, 18 insertions, 14 deletions
@@ -93,28 +93,32 @@ The easiest way to run Neko is using Docker and Docker Compose. Data is persisted in a Docker volume named `neko-data` (mapping to `/app/data/neko.db` inside the container). -### Build with React Frontend +### Build from Source -Neko now includes a modern React frontend. To build the full application: +Neko is designed for easy building. Static assets for the frontends are pre-built and checked into the repository in the `dist/` directory, so a standard Go build is all that's required for most users. -1. **Build the Frontend**: +1. **Standard Build**: ```bash - cd frontend - npm install - npm run build + # Uses existing assets in dist/ + make build ``` - This generates the static assets in `frontend/dist`. + A `neko` binary will be created in the root directory. -2. **Embed Assets and Build Backend**: - The backend uses `go.rice` to embed the static assets. +2. **Full Rebuild (including UI)**: + If you modify the React or Vanilla frontends, you'll need to rebuild them and update the embedded assets. This requires Node.js and the `rice` tool. ```bash - # From the root directory - go install github.com/GeertJohan/go.rice/rice@latest - rice embed-go -i ./web - go build + # Rebuilds everything: cleans, builds UIs, updates rice-box.go, and builds binary + make all ``` -A `neko` binary will be created in the root directory. +3. **Updating Embedded Assets Only**: + If you want to update the Go binary's embedded assets without a full clean: + ```bash + make ui # Rebuild React frontend + make vanilla-ui # Update Vanilla assets + make embed # Update the Go-embedded assets (rice-box.go) + make build # Build final binary + ``` # Configuration |
