Split font variants into separate folders #136
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why
Resolves #103
Supersedes #126
The font packages should allow importing individual fonts to avoid including all fonts in your application bundle.
How
The diff is large here because I had to regenerate packages with the new folder structure.
The first 5 commits do the actual work, the last commit updates packages.
package.json
formatting ea0c7e3master
->main
to reflect the new base branch of the repo 92986250.3.0
to prepare for release 0f8b877Testing
The main thing to verify that this change allows importing individual packages but is also backwards compatible.
I tested using yalc, so in my case:
cd font-packages/zain
yalc
store withyalc publish
yarn create expo-app --template blank-typescript test-fonts
yalc add @expo-google-fonts/zain
App.tsx
with the code example from the README - ensure it works ✅The other thing to verify that all other generated files where we're linking to font assets from the repo will include the new variant folder. I updated the packaged themselves and the gallery, but I might have missed some places.