Skip to content

Create Block: Unify WordPress packages installation#71385

Open
Adi-ty wants to merge 4 commits intoWordPress:trunkfrom
Adi-ty:refactor/unified-wp-packages-installation
Open

Create Block: Unify WordPress packages installation#71385
Adi-ty wants to merge 4 commits intoWordPress:trunkfrom
Adi-ty:refactor/unified-wp-packages-installation

Conversation

@Adi-ty
Copy link
Copy Markdown
Contributor

@Adi-ty Adi-ty commented Aug 28, 2025

What?

Unifies the installation of @wordpress/scripts and @wordpress/env packages by adding them directly to devDependencies, then running a single npm install command.
Follow-up to #71072

Why?

As suggested by @gziolo , running multiple separate npm install commands is inefficient. The current approach runs:

  1. npm install (for custom dependencies)
  2. npm install @wordpress/scripts --save-dev (in init-wp-scripts.js)
  3. npm install @wordpress/env --save-dev (in init-wp-env.js)

This creates unnecessary network overhead and slower scaffolding experience.

How?

  • Modified package.json creation to include WordPress packages in devDependencies when requested
  • Updated init-wp-scripts.js and init-wp-env.js to remove npm install

@Adi-ty Adi-ty marked this pull request as ready for review August 29, 2025 04:55
@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 29, 2025

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Adi-ty <iamadisingh@git.wordpress.org>
Co-authored-by: gziolo <gziolo@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Code Quality Issues or PRs that relate to code quality [Tool] Create Block /packages/create-block labels Aug 29, 2025
@gziolo
Copy link
Copy Markdown
Member

gziolo commented Sep 2, 2025

Thank you for the follow-up. I left some feedback to consider.

@Adi-ty Adi-ty requested a review from gziolo March 29, 2026 07:49
@Adi-ty
Copy link
Copy Markdown
Contributor Author

Adi-ty commented Mar 29, 2026

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Tool] Create Block /packages/create-block [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants