build.sh (486B)
1 #!/usr/bin/env bash 2 set -euo pipefail 3 cd "$(dirname "$0")/../.." 4 # Resolve tooling through the repository's locked nixpkgs, not npm or a global tsc. 5 if [[ "${1:-}" == --check ]]; then 6 temporary=$(mktemp -d) 7 trap 'rm -rf "$temporary"' EXIT 8 nix shell --inputs-from . nixpkgs#typescript -c tsc -p ext/demo-site/tsconfig.json --outDir "$temporary" 9 diff -ru ext/demo-site/dist "$temporary" 10 else 11 nix shell --inputs-from . nixpkgs#typescript -c tsc -p ext/demo-site/tsconfig.json 12 fi