Compress the CSS-channel note in tsdown.config.ts, the vitest lane explainer and the release workflow header; fix the install-hooks header (git only consults .git/hooks when core.hooksPath is unset); slim the social-preview generator and bundle-patch comments.
18 lines
478 B
Bash
18 lines
478 B
Bash
#!/usr/bin/env bash
|
|
# Installs a native pre-commit hook that runs `pnpm run typecheck`. Git only
|
|
# executes .git/hooks when `core.hooksPath` is unset (husky sets it to .husky/_).
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
HOOKS_DIR="$ROOT/.git/hooks"
|
|
|
|
mkdir -p "$HOOKS_DIR"
|
|
|
|
cat > "$HOOKS_DIR/pre-commit" <<'EOF'
|
|
#!/usr/bin/env sh
|
|
pnpm run typecheck
|
|
EOF
|
|
|
|
chmod +x "$HOOKS_DIR/pre-commit"
|
|
echo "pre-commit hook installed at .git/hooks/pre-commit"
|