Issue
Currently when using wp scaffold plugin you are limited to the provided plugin architecture. This is not ideal where you might have your own architecture you would like to use. In most cases this can be solved with other scripts, but it takes you outside of the convenience of wp-cli.
Proposal
Add a new --github flag which will allow wp scaffold plugin to checkout a source that will be used for scaffolding.
Example usage:
# Checkout default branch and use for scaffolding.
wp scaffold plugin --github=myorg/mypluginbase
# Checkout alternate branch to use for scaffolding.
wp scaffold plugin --github=myorg/mypluginbase:alternate-branch
Considerations
exec() vs PHP git library
- Replacement patterns for source files (and the methods to do the replacing)
- Alternate method to determine successful checkout and replacement than
log_whether_files_written