Skip to content

Commit

Permalink
Add picosvg to optimization step (#883)
Browse files Browse the repository at this point in the history
* Add picosvg to optimization step

This should help remove `fill-rule="evenodd"` from SVGs, improving where
they can be rendered.

* Create thick-lions-explain.md
  • Loading branch information
eliperkins committed Dec 19, 2022
1 parent e05ddd3 commit 8a039a7
Show file tree
Hide file tree
Showing 486 changed files with 506 additions and 486 deletions.
5 changes: 5 additions & 0 deletions .changeset/thick-lions-explain.md
@@ -0,0 +1,5 @@
---
"@primer/octicons": patch
---

Remove fill-rule from SVGs using picosvg as an optimization step
1 change: 1 addition & 0 deletions .github/actions/python/requirements.txt
@@ -0,0 +1 @@
picosvg~=0.20.6
19 changes: 17 additions & 2 deletions .github/workflows/optimize.yml
@@ -1,19 +1,34 @@
on:
push:
paths:
- 'icons/**'
- '.github/workflows/optimize.yml'
- 'icons/**'
- '.github/workflows/optimize.yml'
- '.github/actions/python/requirements.txt'
pull_request:
paths:
- 'icons/**'
- '.github/workflows/optimize.yml'
- '.github/actions/python/requirements.txt'
name: Optimize SVGs
jobs:
optimize:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- run: pip install -r .github/actions/python/requirements.txt
- run: for icon in icons/*; do picosvg $icon --output_file $icon; done

- uses: actions/setup-node@master
with:
node-version: '10.x'
- run: npm install
- run: npm run svgo

- uses: EndBug/add-and-commit@v4
with:
add: 'icons'
Expand Down
2 changes: 1 addition & 1 deletion icons/accessibility-16.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/accessibility-inset-16.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/alert-16.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/alert-24.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/alert-fill-12.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/alert-fill-16.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/alert-fill-24.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/apps-16.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/archive-16.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/archive-24.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-both-16.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-down-16.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-down-24.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-down-left-16.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-down-left-24.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-down-right-16.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-down-right-24.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-left-16.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-left-24.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-right-16.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-right-24.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-up-16.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-up-24.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/arrow-up-left-16.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8a039a7

Please sign in to comment.