Skip to content

Conversation

@USERSATOSHI
Copy link
Contributor

@USERSATOSHI USERSATOSHI commented Aug 26, 2025

What?

Closes #23514

Introduces the new @wordpress/create-project package - a comprehensive scaffolding tool that creates WordPress plugins, themes, blocks, and blueprints with modern build tooling, addressing the need for scaffolding non-block scripts and UI components.

Why?

Currently, @wordpress/create-block only scaffolds single-block plugins, but WordPress development often requires creating scripts for components like sidebar panels, or other non-block functionality. Developers were forced to:

  1. Create a block plugin with @wordpress/create-block
  2. Manually modify the generated files to register scripts instead of blocks
  3. This process was cumbersome, error-prone, and unnecessary

The new @wordpress/create-project tool solves this by providing a unified scaffolding solution for all WordPress development needs, not just blocks.

How?

This PR introduces a complete scaffolding system that expands beyond blocks to support the full WordPress development ecosystem:

Core Features:

  1. Multi-Project Type Support:

    • Plugins: For UI components, admin panels, REST APIs, custom functionality
    • Themes: FSE themes, Classic themes with modern tooling
    • Blocks: Standalone blocks or blocks within plugins/themes
    • Blueprints: WordPress Playground environments for testing
  2. Interactive CLI Experience:

    • Guided configuration for each project type
    • Smart defaults based on project type
  3. Flexible Architecture:

    • Modular Mustache template system
    • Variant support (FSE vs Classic themes, Static vs Dynamic blocks)
    • Extensible for future project types

Testing Instructions

  1. Run wp-create-project
  2. Select different project types from the menu:
    • Plugin → Creates plugin structure
    • Theme → Creates theme structure
    • Block → Creates standalone block
    • Blueprint → Creates WordPress Playground configuration
  3. Follow the prompts and verify proper project structure is generated

Testing Instructions for Keyboard

The CLI tool is fully keyboard accessible:

  1. Use arrow keys to navigate selection menus
  2. Use Enter to confirm selections
  3. Use Tab to navigate form fields in prompts
  4. All text input uses standard terminal input (fully accessible)
  5. No mouse interaction required for any functionality

Screenshots or screencast

Blueprint

Screen.Recording.2025-09-05.at.7.54.34.PM.mov

Theme

Screen.Recording.2025-09-05.at.7.56.18.PM.mov

- extracted and refactored create-block into create-project
- generalized cli and code to support theme and standalone blocks
- added plugin template from create-block
- refactor the code cause I was not able to fix property override issue at all when doing theme
- blocks for theme will be added in `assets/src/blocks` cause that seemed liked a good place
- proper blueprint support
- theme now supports classic and fse variant
@USERSATOSHI USERSATOSHI changed the title [WIP] Add @wordpress/create-project to scaffold themes/plugins. Add @wordpress/create-project to scaffold themes/plugins. Sep 5, 2025
@USERSATOSHI USERSATOSHI marked this pull request as ready for review September 5, 2025 14:47
@github-actions
Copy link

github-actions bot commented Sep 5, 2025

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core, Gutenberg Plugin, New Block.
  • Labels found: .

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@github-actions
Copy link

github-actions bot commented Sep 5, 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: USERSATOSHI <tusharbharti@git.wordpress.org>
Co-authored-by: gziolo <gziolo@git.wordpress.org>
Co-authored-by: mrleemon <leemon@git.wordpress.org>
Co-authored-by: ryanwelcher <welcher@git.wordpress.org>
Co-authored-by: flexseth <flexseth@git.wordpress.org>
Co-authored-by: leoloso <leoloso@git.wordpress.org>

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a @wordpress/create-project package to scaffold scripts and styles

1 participant