mozilla / tippy-top-sites-deprecated

[deprecated][unmaintained]
7 stars 7 forks source link

Auto-optimize images via commit hook? #73

Open pdehaan opened 7 years ago

pdehaan commented 7 years ago

Not sure if this would work, but I saw this on @chuckharmston's beautiful mozilla/testpilot-ga repo:

https://github.com/okonet/lint-staged

Possibly just auto-run the npm run optimize script on a precommit hook using husky or something. Then we never have to worry about manually running the script in the future (since it's really hard for me to tell if an image in a PR has been pre-optimized or not).

Conversely, we could be lazy and maybe find some other apropo hook, like preversion or prepublish or something. Then it will just automatically optimize right before we push a new version to npm; which may be good enough(tm).