Skip to content
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 a basic child theme template #20

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open

Conversation

ryelle
Copy link
Contributor

@ryelle ryelle commented May 4, 2022

This is a basic child theme template, which will use the wporg-parent-2021 theme as its parent. It also includes a script to generate the project, using the same mustache template engine as create-block, so our templates are the same between #21 & here.

The create script I've written here is PHP - I did that rather than creating a new package.json so I could use JS. It's very simple, inspired from create-block. I had thought maybe we could switch out different templates depending on the argument -- so this has create child-theme, but we could also do create env to create a full env with .wp-env.json, etc.

$ ./bin/create child-theme

Let's create a child theme project!
Hit enter to accept the default values.

The display title for the theme [default: Child Theme]: 
The theme slug used for identification (also the output folder name) [default: wporg-child-theme]: 
The short description for the theme: 
The textdomain used for this theme [default: wporg]: 

Generating theme…

Tada! Theme created in /full/path/to/wporg-child-theme

This wouldn't generate blocks — the block template in #21 can be used with @wordpress/create-block to create mu-plugins blocks, and any blocks we want to create as standalone plugins can just be vanilla @wordpress/create-block (or we can make another template).

@ryelle ryelle force-pushed the add/child-theme-template branch from bfd59c2 to 2231260 Compare June 29, 2022 18:06
@ryelle
Copy link
Contributor Author

ryelle commented Jun 29, 2022

Switching this out of draft mode, though I'm still looking for feedback on the idea as well as the code.

@ryelle ryelle marked this pull request as ready for review June 29, 2022 21:18
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.

1 participant