Add script to check whether npm i needs to be run

and add it to the `build` command
This commit is contained in:
Michael B. Gale
2025-09-25 14:20:30 +01:00
parent 853decd26b
commit 455038c8a7
13 changed files with 19 additions and 12 deletions

7
scripts/check-node-modules.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
set -e
# Check if npm install is likely needed before proceeding
if [ ! -d node_modules ] || [ package-lock.json -nt node_modules/.package-lock.json ]; then
npm install
fi