Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Refactor icon generation #57

Merged
merged 5 commits into from
Aug 8, 2019
Merged

Refactor icon generation #57

merged 5 commits into from
Aug 8, 2019

Conversation

justinanastos
Copy link
Contributor

Release Notes

  • Refactor icon conversion script to use @babel/types instead of immutability-helper and trying to craft AST by hand. That was too opaque and it wasn't type safe. Now we're safe and it's as concise as it's going to get.

  • Move intermediate icon files to src/icons

    This makes them accessible from anywhere else and gives them access to other modules. We were going to use this for the EmotionProvider, but now we aren't. This is less elegant and clever, but makes more sense and will make our code actually work.

Using @babel/types allows us to keep the AST manipulation more concise and
type-safe
We now use `src/icons` as the temporary directory for our generated
TypeScript icons. Even though I don't like this, it makes the most sense
because now TypeScript can treat all our files we're goign to transpile for
consumers the same way.
@justinanastos justinanastos merged commit 9f69cdd into master Aug 8, 2019
@justinanastos justinanastos deleted the justin/move-icons branch August 8, 2019 20:27
@justinanastos
Copy link
Contributor Author

🚀 PR was released in v1.0.5 🚀

@justinanastos justinanastos added the released This issue/pull request has been released. label Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants