commit fbf0143888d418d809dc034a502eb71e744d60df parent 738a007143d436437d108e93b2aa1d6b5623917d Author: mtmn <miro@haravara.org> Date: Sun, 12 Apr 2026 22:16:32 +0200 chore: update docs and justfile Diffstat:
| M | README.md | | | 4 | ++-- |
| M | justfile | | | 42 | ++++++++++++++++++++++++++++++------------ |
2 files changed, 32 insertions(+), 14 deletions(-)
diff --git a/README.md b/README.md @@ -20,10 +20,10 @@ This project uses [just](https://github.com/casey/just) and [Nix](https://nixos. just shell # Build the project (server and client) -just build +just nix build # Run the binary built by Nix -./result/bin/scorpus-server +just nix run ``` ### Spago Build (PureScript) diff --git a/justfile b/justfile @@ -1,29 +1,47 @@ help: @just --list -# Enter the Nix development shell -shell: - nix develop - -# Build the project using Nix -nix-build: - nix build . +# Setup npm and spago +setup: + npm install + npx spago install -# Build the project locally (using npm) +# Build the project locally build: npm run build # Run the project locally run: - npm start + npx spago run + +# Run tests +test: + npm test # Format PureScript source code tidy: npm run tidy -# Run tests -test: - npm test +# Enter the Nix development shell +shell: + nix develop + +# Nix operations (build, run) +nix command: + @if [ "{{ command }}" = "build" ]; then \ + nix build .; \ + elif [ "{{ command }}" = "run" ]; then \ + ./result/bin/scorpus-server; \ + else \ + echo "Unknown nix command: {{ command }}"; \ + exit 1; \ + fi + +# Run quality and security checks +check: + npx spago build --purs-args "--fail-on-warnings" + npx purs-tidy check "src/**/*.purs" + npm audit # Build the container image using Nix container: