Skip to content

Commit

Permalink
chore: Remove OptiPNG from local dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Sep 18, 2023
1 parent 6f81059 commit ab49a46
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
12 changes: 0 additions & 12 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# Check if staged files contain any added or modified PNGs - skip when merging
if \
git rev-parse -q --verify MERGE_HEAD \
&& git diff --cached --name-status | grep '^[AM]' | grep -q '.png$'
then
# Error if OptiPNG is not installed
if ! command -v optipng >/dev/null; then
echo "PNG files must be optimized before being committed, but OptiPNG is not installed! Fix this with \`brew/apt install optipng\`."
exit 1
fi
fi

pnpm lint-staged
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,6 @@
"!(posthog/hogql/grammar/*)*.{py,pyi}": [
"black",
"ruff"
],
"*.png": [
"optipng -clobber -o4 -strip all"
]
},
"browserslist": {
Expand Down

0 comments on commit ab49a46

Please sign in to comment.