Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: SVGO config #1671

Merged
merged 8 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion proprietary/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"directory": "proprietary/assets"
},
"scripts": {
"optimize-icons": "svgo -f icons"
"optimize-icons": "svgo -f icons --exclude=Radio.svg"
},
"devDependencies": {
"svgo": "3.3.2"
Expand Down
13 changes: 13 additions & 0 deletions proprietary/assets/svgo.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* eslint-disable no-undef */
module.exports = {
plugins: [
'removeDimensions',
'removeUselessStrokeAndFill',
{
name: 'removeAttrs',
params: {
attrs: '(fill|stroke)',
},
},
],
}
15 changes: 15 additions & 0 deletions proprietary/react-icons/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- @license CC0-1.0 -->
alimpens marked this conversation as resolved.
Show resolved Hide resolved

# Contributing Guidelines

## Contents

- [Exporting icons](#exporting-icons)

## Exporting icons

To export all icons from [the Figma file](https://www.figma.com/design/9IGm6IdPUYizBNGsUnueBd/Amsterdam-Design-System?node-id=6852-5124) to SVG use the native SVG export functionality in Figma. To select all icons select the shapes frame, press `Enter` to select direct children and then `Enter` again to select all icon components. The select export to SVG in the sidebar and export all icons to the `icons` folder. Then run the following command to optimize the SVG files:
alimpens marked this conversation as resolved.
Show resolved Hide resolved

```sh
npm run optimize-icons
```