Conversation
moonmeister
left a comment
There was a problem hiding this comment.
Looks like a good start. Do folks need to include https://developer.wordpress.org/block-editor/reference-guides/packages/packages-base-styles/ ??
examples/next/render-blocks-pages-router/scripts/fetchWpGlobalStyles.js
Outdated
Show resolved
Hide resolved
moonmeister
left a comment
There was a problem hiding this comment.
This should be its own example, not a modification of a previous example. Thanks.
5b32846 to
0760b8e
Compare
moonmeister
left a comment
There was a problem hiding this comment.
looking good, I'm not seeing a wp-env setup though.
colinmurphy
left a comment
There was a problem hiding this comment.
This looks good but there isn't any details on how to setup with wp-env in your README. 🚀
@colinmurphy Sure, readme instructions added. Thank you! |
moonmeister
left a comment
There was a problem hiding this comment.
did a quick review of the JS. didn't do any actual testing but in general looks good. I left some quick notes on things I'd do different. That said none are deal breakers.
examples/next/wp-theme-rendered-blocks/example-app/scripts/fetchWpGlobalStyles.js
Outdated
Show resolved
Hide resolved
examples/next/wp-theme-rendered-blocks/example-app/scripts/fetchWpGlobalStyles.js
Outdated
Show resolved
Hide resolved
examples/next/wp-theme-rendered-blocks/example-app/scripts/fetchWpGlobalStyles.js
Outdated
Show resolved
Hide resolved
ahuseyn
left a comment
There was a problem hiding this comment.
Nice script and example @whoami-pwd 🚀🚀
- Build failed for me, so I've suggested the fixes related to it.
- Suggested changes to the readme.
- Added a script to run the style fetching and included it to the wp-env setup flow.
examples/next/wp-theme-rendered-blocks/example-app/package.json
Outdated
Show resolved
Hide resolved
examples/next/wp-theme-rendered-blocks/example-app/scripts/fetchWpGlobalStyles.js
Outdated
Show resolved
Hide resolved
examples/next/wp-theme-rendered-blocks/example-app/scripts/fetchWpGlobalStyles.js
Outdated
Show resolved
Hide resolved
josephfusco
left a comment
There was a problem hiding this comment.
@whoami-pwd This looks good, I can help migrate this to from commonJS to ESM before merging in.
examples/next/wp-theme-rendered-blocks/example-app/scripts/fetchWpGlobalStyles.js
Outdated
Show resolved
Hide resolved
c07baf2
colinmurphy
left a comment
There was a problem hiding this comment.
Looks good to me 🚀 🚀 🚀
One small thing (not a blocker) is once the PR is merged, lets create a follow on PR to add the example into the example README.
|
Also tested locally and looks great ❤️ |
Fixes #64
Provides an example of fetching WP Global Stylesheet: