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

Feature: templates.scripts to run commands with the newly created site #40

Open
slaFFik opened this issue Nov 14, 2024 · 0 comments
Open

Comments

@slaFFik
Copy link
Contributor

slaFFik commented Nov 14, 2024

Similar to what composer.json : scripts allows us to do - execute a certain script.

So, when a site is created using this templates, for example:

[
	"name" => "Basic WordPress",
	"scripts" => [
		"wp post generate --count=10",
		"wp comment generate --count=20",
		"wp import /home/user/Projects/prefill.xml --authors=create",
	]
],

the commands from an array in the scripts section will be executed, allowing to do something with the new WP install: hydrate the database from the SQL or wrx/xml file, configure settings, etc. Tons of possibilities.

I don't think this needs to be in the defaults section though, can't think of the use cases where it's needed globally for all templates.

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

No branches or pull requests

1 participant