Adds a development server for testing collection builds#26
Merged
Conversation
vcanales
reviewed
Apr 15, 2024
mikachan
approved these changes
Jun 21, 2024
Member
mikachan
left a comment
There was a problem hiding this comment.
Thanks for working on this @creativecoder! Sorry for the delayed review.
This makes testing the collection builds much easier. Works well for me, I'm happy to bring this in 👍
Collaborator
Author
|
Thanks for the review @mikachan ! I think I'll add some instructions in the readme about how to use the development server (basically the testing instructions from this PR) and then get this merged. |
Member
Sounds good! |
Collaborator
Author
Actually I see the readme could some other changes, as well. I've opened a separate PR here: #32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Adds a simple node development server for testing font collections
Testing Instructions
Generate a collection and previews, if you haven't already
GOOGLE_FONTS_API_KEY=YOUR_KEY npm run apinpm run previewsNote that there may be errors when downloading fonts to generate previews. You can download the font individually with
node src/generate_font_previews.js "FONT NAME"and then restart the preview generation command.Add the following filters to an mu-plugin on your development site
Now start the development server:
npm run serveYou should now be able to load the font collection from the site editor, and it will be served from the local development server. You can watch the development server log to verify this.