Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Commit

Permalink
feat(web): optimize icons with SVGO
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer committed Apr 18, 2020
1 parent 4f75fc7 commit 9ae9239
Show file tree
Hide file tree
Showing 185 changed files with 1,060 additions and 1,021 deletions.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
],
"scripts": {
"build": "ts-node ./scripts/node.ts",
"optimize": "svgo --config svgo.config.json --pretty --folder web",
"lint": "foundry run eslint . --ext .ts,.tsx,.js,.jsx",
"lint:fix": "yarn lint --fix",
"lint:ci": "yarn lint --format junit -o __reports__/eslint-results.xml",
Expand All @@ -34,7 +35,11 @@
"babel-plugin-inline-react-svg": "^1.1.1",
"dedent": "^0.7.0",
"lodash": "^4.17.15",
"svgo": "^1.3.2",
"ts-node": "^8.8.2",
"typescript": "^3.8.3"
},
"peerDependencies": {
"react": "16.x"
}
}
2 changes: 1 addition & 1 deletion scripts/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const DIST_DIR = path.join(BASE_DIR, 'dist');
const BABEL_CONFIG = {
cwd: BASE_DIR,
presets: [['@babel/preset-env', { modules: false }], '@babel/preset-react'],
plugins: ['inline-react-svg'],
plugins: [['inline-react-svg', { svgo: false }]],
};

enum IconSize {
Expand Down
9 changes: 9 additions & 0 deletions svgo.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"plugins": [
{
"convertColors": {
"currentColor": "#212933"
}
}
]
}
12 changes: 6 additions & 6 deletions web/add_item_filled_large.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 3 additions & 6 deletions web/add_item_large.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions web/add_person_filled_large.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 3 additions & 5 deletions web/add_person_large.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions web/american_express_large.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

1 comment on commit 9ae9239

@vercel
Copy link

@vercel vercel bot commented on 9ae9239 Apr 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment failed with the following error:

The provided path “/tmp/ATK4LSZx3wn0lcytizAymTED/repo/icons” does not exist. To change your project settings, go to https://zeit.co/sumup-oss/icons/settings

Please sign in to comment.