-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add optimize script #9580
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
Add optimize script #9580
Conversation
sam-b-rose
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just for my own understanding, this is so we can optimize the source icons and the bundled React icons as well?
|
Just the source icons. Makes it easier to contribute a bundle like @Rusty-UX is doing for RTE icons. Before we pretty much had to one off them in https://jakearchibald.github.io/svgomg/ with the right toggles |
| "dev": "rollup -c -w", | ||
| "test": "jest", | ||
| "clean": "rm -rf .turbo node_modules dist" | ||
| "optimize": "yarn svgo -f icons", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heads up @kyledurand and @samrose3, I don't think yarn is needed here. svgo's bin script should automatically be symlinked to node_modules/.bin and thus available to the run-script:
See here:
When this package is installed as a dependency in another package, the file will be linked where it will be available to that package either directly by npm exec or by name in other scripts when invoking them via npm run-script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch and great point!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat!
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @shopify/polaris-icons@7.2.0 ### Minor Changes - [#9581](#9581) [`991d9fe69`](991d9fe) Thanks [@Rusty-UX](https://github.com/Rusty-UX)! - Added BoldMajor, BoldMinor, IndentMajor, IndentMinor, ItalicMajor, ItalicMinor, OrderedListMajor, OrderedListMinor, OutdentMajor, OutdentMinor, TextColorMajor, TextColorMinor, UnderlineMajor, UnderlineMinor icons - [#9580](#9580) [`75f08f32c`](75f08f3) Thanks [@kyledurand](https://github.com/kyledurand)! - Added optimize script ## @shopify/polaris@11.3.1 ### Patch Changes - [#9556](#9556) [`c72d2f905`](c72d2f9) Thanks [@aaronccasanova](https://github.com/aaronccasanova)! - Restructured `Select` override selectors to patch Sass compilation issue - [#9031](#9031) [`795ae3782`](795ae37) Thanks [@danbrady](https://github.com/danbrady)! - Added support for `Avatar` being presentational - Updated dependencies \[[`991d9fe69`](991d9fe), [`75f08f32c`](75f08f3)]: - @shopify/polaris-icons@7.2.0 ## @shopify/polaris-cli@0.2.10 ## polaris.shopify.com@0.55.8 ### Patch Changes - Updated dependencies \[[`c72d2f905`](c72d2f9), [`795ae3782`](795ae37), [`991d9fe69`](991d9fe), [`75f08f32c`](75f08f3)]: - @shopify/polaris@11.3.1 - @shopify/polaris-icons@7.2.0 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @shopify/polaris-icons@7.2.0 ### Minor Changes - [Shopify#9581](Shopify#9581) [`991d9fe69`](Shopify@991d9fe) Thanks [@Rusty-UX](https://github.com/Rusty-UX)! - Added BoldMajor, BoldMinor, IndentMajor, IndentMinor, ItalicMajor, ItalicMinor, OrderedListMajor, OrderedListMinor, OutdentMajor, OutdentMinor, TextColorMajor, TextColorMinor, UnderlineMajor, UnderlineMinor icons - [Shopify#9580](Shopify#9580) [`75f08f32c`](Shopify@75f08f3) Thanks [@kyledurand](https://github.com/kyledurand)! - Added optimize script ## @shopify/polaris@11.3.1 ### Patch Changes - [Shopify#9556](Shopify#9556) [`c72d2f905`](Shopify@c72d2f9) Thanks [@aaronccasanova](https://github.com/aaronccasanova)! - Restructured `Select` override selectors to patch Sass compilation issue - [Shopify#9031](Shopify#9031) [`795ae3782`](Shopify@795ae37) Thanks [@danbrady](https://github.com/danbrady)! - Added support for `Avatar` being presentational - Updated dependencies \[[`991d9fe69`](Shopify@991d9fe), [`75f08f32c`](Shopify@75f08f3)]: - @shopify/polaris-icons@7.2.0 ## @shopify/polaris-cli@0.2.10 ## polaris.shopify.com@0.55.8 ### Patch Changes - Updated dependencies \[[`c72d2f905`](Shopify@c72d2f9), [`795ae3782`](Shopify@795ae37), [`991d9fe69`](Shopify@991d9fe), [`75f08f32c`](Shopify@75f08f3)]: - @shopify/polaris@11.3.1 - @shopify/polaris-icons@7.2.0 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @shopify/polaris-icons@7.2.0 ### Minor Changes - [Shopify#9581](Shopify#9581) [`991d9fe69`](Shopify@a847d9c) Thanks [@Rusty-UX](https://github.com/Rusty-UX)! - Added BoldMajor, BoldMinor, IndentMajor, IndentMinor, ItalicMajor, ItalicMinor, OrderedListMajor, OrderedListMinor, OutdentMajor, OutdentMinor, TextColorMajor, TextColorMinor, UnderlineMajor, UnderlineMinor icons - [Shopify#9580](Shopify#9580) [`75f08f32c`](Shopify@01fb273) Thanks [@kyledurand](https://github.com/kyledurand)! - Added optimize script ## @shopify/polaris@11.3.1 ### Patch Changes - [Shopify#9556](Shopify#9556) [`c72d2f905`](Shopify@0c270b0) Thanks [@aaronccasanova](https://github.com/aaronccasanova)! - Restructured `Select` override selectors to patch Sass compilation issue - [Shopify#9031](Shopify#9031) [`795ae3782`](Shopify@c68e956) Thanks [@danbrady](https://github.com/danbrady)! - Added support for `Avatar` being presentational - Updated dependencies \[[`991d9fe69`](Shopify@a847d9c), [`75f08f32c`](Shopify@01fb273)]: - @shopify/polaris-icons@7.2.0 ## @shopify/polaris-cli@0.2.10 ## polaris.shopify.com@0.55.8 ### Patch Changes - Updated dependencies \[[`c72d2f905`](Shopify@0c270b0), [`795ae3782`](Shopify@c68e956), [`991d9fe69`](Shopify@a847d9c), [`75f08f32c`](Shopify@01fb273)]: - @shopify/polaris@11.3.1 - @shopify/polaris-icons@7.2.0 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
No description provided.