mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
- Use npx -y for tsx to avoid install prompts - Remove tsx from devDependencies since we use npx - Remove npm install checks from format-ts.sh
23 lines
597 B
Bash
Executable File
23 lines
597 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Change to the script's directory
|
|
cd "$(dirname "$0")"
|
|
|
|
# Check if node/npm is available
|
|
if ! command -v npm &> /dev/null; then
|
|
echo "Error: npm is not installed" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# Install dependencies if node_modules doesn't exist
|
|
if [ ! -d "node_modules" ]; then
|
|
echo "Installing dependencies..." >&2
|
|
if ! npm install > /tmp/npm-install.log 2>&1; then
|
|
echo "npm install failed! Output:" >&2
|
|
cat /tmp/npm-install.log >&2
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
# Run the TypeScript headless test runner with all arguments
|
|
npx -y tsx src/headless-test-runner.ts "$@" |