twig_to_sdc
No security coverage
This codegen tool simplifies the conversion of existing Twig components into SDC compatible components, saving time and reducing manual effort. By analyzing the provided Twig code, the tool automatically generates the .component.yml file, eliminating the need for manual setup entirely.
While the tool streamlines the conversion process, it might not cover every scenario perfectly. Some props or specific cases may need a little extra attention, which is why we recommend reviewing the generated files to ensure everything fits your unique project requirements.
Think of Twig to SDC as a helpful assistant that takes care of the heavy lifting, while you fine-tune the details where needed.
Demo
Usage
- Run the Drush command:
drush twig_to_sdc:generate /path/to/directory - The tool will generate a
.component.ymlfile in the same location as each Twig file. - Review the generated `.component.yml` files, test them in your environment, and adjust them as needed.
Key features
- AI-Powered annotation
- Comprehensive twig template parsing
- Structured
.component.ymlgeneration