postcss / postcss.org

Official website for PostCSS
https://postcss.org
MIT License
80 stars 49 forks source link

Automatically optimize images and SVGs in pre-commit hook #146

Closed okonet closed 8 years ago

okonet commented 8 years ago

This is a follow up for this note:

I've, so far, committed only optimised svgs to the repo and so, if possible, can you run the logo through SVGO (perhaps via https://jakearchibald.github.io/svgomg/) before you commit it.

that came from #145

jeddy3 commented 8 years ago

:+1: :)

marcustisater commented 8 years ago

Awesome, I totally forgot about that.

Side note: The PostCSS logo is in the brand repository, we should do a similar thing over there.

stephenway commented 8 years ago

We are, with the gulp minify task, just need to add it to the main pre-commit task.

MoOx commented 8 years ago

That might help https://www.npmjs.com/package/ghooks

marcustisater commented 8 years ago

Thanks @MoOx - I can try get this going, during the week.

okonet commented 8 years ago

I'm on it. No worries.

okonet commented 8 years ago

BTW should we use a webpack loader for that instead? Or pre-commit hook is more explicit?

MoOx commented 8 years ago

The simpler solution (and more portable) is to avoid webpack when possible but that's not always relevant.