-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Icons Package: Add build process #38850
Comments
@tbradsha Since you're interested in working on this, here's what I think could be the success criteria for the minimum viable first iteration:
(In future iterations, we could add more export types, for example so the original svg files can be directly consumed with As for where to start, the entry point of the repo's build process is this build.js file, which then delegates work to Is that enough info to get started? |
@mirka Thanks! Just to make sure we're on the same page for the initial scope:
|
Ideally, they are auto-generated into the // src/index.js
export someIcon from './library/some-icon.svg';
export anotherIcon from './library/another-icon.svg'; and add some webpack config for the icons package so SVG files are loaded as React components, using something like By convention,
No strong opinion on where the tooling scripts live. It could either live in |
Great, so skip
Ah, makes sense. |
A note from one of the PRs:
|
As the project grows, so does the need to simplify the contribution flow for new icons. In that light, we should consider adding a build step to the Icons package. It could work like this:
src
folder of thepackages/icons
becomes a gitignoredbuild
foldersrc
folder should be just a list of raw SVGs exported from the WordPress Design Library Figma.packages/icons/build.js
.For the build script, we can potentially take inspiration from this build process.
There are a few steps that need to be taken to improve the Figma file itself, to enable this flow:
path
.The Figma changes can happen independently of a build step. Here's a zip file containing raw SVG versions of the existing published library, as well as a first draft of a new README file:
icons-package.zip
The text was updated successfully, but these errors were encountered: