summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorojacobson <ojacobson@noreply.codeberg.org>2025-05-30 21:12:57 +0200
committerojacobson <ojacobson@noreply.codeberg.org>2025-05-30 21:12:57 +0200
commit7a5c82d9b86e0a0828f4ccaac42b2db398945406 (patch)
treeb80ffb244b9826cd553502505533e1199d4c722f /tools
parentebb6a0bff2dd14afec3f0bb1db556797ac2f34ab (diff)
parent4396c912771f136f7d397a67f247c81532520b85 (diff)
Call `vite` directly to build the frontend.
Calling through `npm` wasn't adding anything other than complexity, and it made it somewhat harder to follow what tools did what. I'm also pretty sure `tools/build-ui` was totally unused. This was originally part of [another proposal][pr-6]. I've broken it out to make the intent clearer, and to make the proposal easier to get a handle on in isolation from other, related changes. Thanks to @wlonk for their input on this! [pr-6]: https://codeberg.org/ojacobson/pilcrow/pulls/6 Merges prop/build-without-npm into main.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/build-ui10
-rwxr-xr-xtools/run2
-rwxr-xr-xtools/run-frontend4
3 files changed, 3 insertions, 13 deletions
diff --git a/tools/build-ui b/tools/build-ui
deleted file mode 100755
index ba8d016..0000000
--- a/tools/build-ui
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash -e
-
-## tools/build-ui
-##
-## Builds the Svelte UI.
-
-cd "$(dirname "$0")/.."
-
-npm install
-npm run build
diff --git a/tools/run b/tools/run
index 88262c6..8560c31 100755
--- a/tools/run
+++ b/tools/run
@@ -11,7 +11,7 @@ trap 'kill "${PIDS[@]}"' EXIT
cargo run &
PIDS+=($!)
-npm run dev -- --host &
+npx vite dev --host &
PIDS+=($!)
wait "${PIDS[@]}"
diff --git a/tools/run-frontend b/tools/run-frontend
index 14ff49c..ccb9bd4 100755
--- a/tools/run-frontend
+++ b/tools/run-frontend
@@ -3,8 +3,8 @@
## tools/run-frontend [OPTIONS…]
##
## Runs a development server for the Pilcrow UI. Options are passed through to
-## the `npm run dev` command. This is best combined with the `API_SERVER`
+## the `npx vite dev` command. This is best combined with the `API_SERVER`
## environment variable, to configure the development server to connect to a
## running Pilcrow instance.
-exec npm run dev -- --host "$@"
+exec npx vite dev --host "$@"