Create Block: Unify WordPress packages installation#71385
Create Block: Unify WordPress packages installation#71385Adi-ty wants to merge 4 commits intoWordPress:trunkfrom
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Thank you for the follow-up. I left some feedback to consider. |
Hi @gziolo, apologies for the delay in implementing the feedback on this PR. I’ve now addressed the suggested changes based on your review. Thanks again for the feedback. |
What?
Unifies the installation of
@wordpress/scriptsand@wordpress/envpackages by adding them directly to devDependencies, then running a singlenpm installcommand.Follow-up to #71072
Why?
As suggested by @gziolo , running multiple separate npm install commands is inefficient. The current approach runs:
npm install(for custom dependencies)npm install @wordpress/scripts --save-dev(in init-wp-scripts.js)npm install @wordpress/env --save-dev(in init-wp-env.js)This creates unnecessary network overhead and slower scaffolding experience.
How?
package.jsoncreation to include WordPress packages in devDependencies when requestedinit-wp-scripts.jsandinit-wp-env.jsto remove npm install