-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add NPM workspaces, build using out of the box wp-scripts #506
Conversation
@stian-overasen This is a great suggestion and thank you for putting all this together! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @stian-overasen!
Composer package changes
|
|
* Optimize docs * Link wp-scripts --------- Co-authored-by: Stian <[email protected]>
I suggest we simplify our build setup by using
wp-scripts
out of the box, removing the unnecessaryentry-files.json
setup and introducing NPM workspaces to build all project packages independently (and also from root).entry-files.json
system.wp-scripts
to build theme scripts and stylesheet without additional webpack config.theme-json
generation intodekode-theme
and disable script for now since there is notheme-json
folder there currently. (This should not be global in case there are additional themes not using this package).Blueprint
plugin as template for fast plugin or block library setup.A note on
entry-files.json
:The
entry-files.json
autodiscovery script was something we made years ago to support the transition away from Yarn while waiting for workspaces support in NPM. Now that NPM support workspaces (and have for a while) andwp-scripts
finally have good support for PostCSS, we don't need theentry-files.json
setup anymore. With NPM workspaces we can let each package build itself and at the same time handle dependencies and build everything from root. NPM workspaces can also be combined with e.g. Turbo or wireit to speed up build time with parallelization and caching.