block-scaffolding-wp icon indicating copy to clipboard operation
block-scaffolding-wp copied to clipboard

Convert init.sh into a Composer PHP script for create-project

Open kasparsd opened this issue 5 years ago • 2 comments

Convert the logic in init.sh into a Composer PHP script that would allow us to simplify the setup down to a single command of composer create-project xwp/block-scaffolding-wp.

kasparsd avatar Dec 10 '19 10:12 kasparsd

The Bash script accepts input from the command line, how would this work with composer create-project?

derekherman avatar Dec 10 '19 11:12 derekherman

This requires converting the Bash script into a PHP script that is cross-platform. Here is the initial prototype for it that can be updated to have the feature parity with what is currently in the init.sh. Notice how it prompts for things:

https://github.com/xwp/block-scaffolding-wp/blob/cc49ce9e8f3f8b45df366348d034740fc68feb3e/scripts/composer/PluginScaffolder.php#L13-L42

kasparsd avatar Dec 10 '19 11:12 kasparsd