diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8acd9167..e838b9b5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -108,7 +108,7 @@ JS build. If you change anything under `strix/viewer_src/`, rebuild and commit the output: ```bash -make viewer # or: npm --prefix strix/viewer_src ci && npm --prefix strix/viewer_src run build +make viewer # or: cd strix/viewer_src && npm ci && npm run build ``` Commit both the source change and the regenerated `strix/viewer/viewer_dist/`. diff --git a/Makefile b/Makefile index b9b77cb0..708aacc8 100644 --- a/Makefile +++ b/Makefile @@ -69,8 +69,7 @@ clean: viewer: @echo "🖥️ Building the local-viewer SPA..." - npm --prefix strix/viewer_src ci - npm --prefix strix/viewer_src run build + cd strix/viewer_src && npm ci && npm run build @echo "✅ Viewer built to strix/viewer/viewer_dist/ (commit the changes)." dev: format lint type-check diff --git a/strix/viewer/cli.py b/strix/viewer/cli.py index 94eb07a4..eb37951a 100644 --- a/strix/viewer/cli.py +++ b/strix/viewer/cli.py @@ -58,8 +58,7 @@ def run_view(argv: list[str]) -> None: if not bundle_is_built(): console.print( "[bold red]Viewer UI is not built.[/]\n" - "Build it with: [cyan]npm --prefix strix/viewer_src ci && " - "npm --prefix strix/viewer_src run build[/]" + "Build it with: [cyan]cd strix/viewer_src && npm ci && npm run build[/]" ) raise SystemExit(1)