summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-11-28 19:08:10 -0500
committerOwen Jacobson <owen@grimoire.ca>2024-11-28 19:08:10 -0500
commitb715f4c6edcb1b8e8df274636b29f732bef65407 (patch)
tree2f61d3df05dc6bee41a2baeb41034e657f36b7ff /tools
parent3c520be3ad06793a48c755921aefc17833ba0481 (diff)
Add separate runners for a freestanding frontend and the (debug version of) the unified build.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/run2
-rwxr-xr-xtools/run-frontend10
-rwxr-xr-xtools/run-unified9
3 files changed, 20 insertions, 1 deletions
diff --git a/tools/run b/tools/run
index a9d52ee..88262c6 100755
--- a/tools/run
+++ b/tools/run
@@ -7,7 +7,7 @@
PIDS=()
-trap 'kill ${PIDS[@]}' EXIT
+trap 'kill "${PIDS[@]}"' EXIT
cargo run &
PIDS+=($!)
diff --git a/tools/run-frontend b/tools/run-frontend
new file mode 100755
index 0000000..14ff49c
--- /dev/null
+++ b/tools/run-frontend
@@ -0,0 +1,10 @@
+#!/bin/bash -e
+
+## 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`
+## environment variable, to configure the development server to connect to a
+## running Pilcrow instance.
+
+exec npm run dev -- --host "$@"
diff --git a/tools/run-unified b/tools/run-unified
new file mode 100755
index 0000000..41ad1de
--- /dev/null
+++ b/tools/run-unified
@@ -0,0 +1,9 @@
+#!/bin/bash -e
+
+## tools/run-unified [OPTIONS…]
+##
+## Runs the service, with the UI unified into it (approximately as it would be
+## in a deployed configuration). Options are passed through to the `pilcrow`
+## command.
+
+exec cargo run --bin pilcrow -- "$@"