Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Twig to SDC

No security coverage Under active development

Part of the Twig ecosystem · 43 projects

This tool helps convert existing Twig components into Drupal's SDC format by automatically generating the necessary configuration files. It analyzes your Twig code and creates `.component.yml` files, then you can review and adjust them for your specific needs.

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

  1. Run the Drush command:
    drush twig_to_sdc:generate /path/to/directory
  2. The tool will generate a .component.yml file in the same location as each Twig file.
  3. 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.yml generation

Ask your assistant about Twig to SDC

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Dec 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core PHP Release date
1.0.0-alpha1 Pre-release 10–11 Dec 6, 2024