There is an official module template Github repository with a step-by-step guide about how to adjust the template when creating a new module based on it (“Steps to prepare this module for your own use”).
It still would come in handy to have a CLI tool that does all the scaffolding for you though. Since I am working a lot with Vue and Ionic, their CLIs for creating new projects come to mind and could be good role models.
After a quick web research and some Slack conversations, it appears that this was not built for Silverstripe so far.
At the moment I consider the following approaches:
- A clean CLI script installable via npm that serves only for this purpose
- A php-based solution that can be used in modules like ssconsole and sakemore
I was thinking of not only having a scaffold command but also something like “analyze” for existing modules with recommendations for changes to comply with the guideline and maybe even a module score prediction.
Before kicking this off I was wondering if anybody else has some thoughts about this?