Scaffold your Single Directory Components.
Use the CLI to give you a starting point for your component. This includes:
- The
my-thing.component.ymlfile. - The
README.md - The
thumbnail.png - The component's Twig templates, including the ones for variants
- The JS file.
- The CSS file.
The most significant part is the generation of metadata.json, which contains critical metadata information.
See it in action (1m 26s):
Usage
drush pm:enable --yes cl_generator
drush generate theme:sdc:component
Then answer the questions in the prompt. Done.
What version should I use?
Select the version of this module based on the component solution that you are using.
IMPORTANT: You don't need this module if your project runs Drush 12 or later. It is included in Drush 12+.
| CL Components | SDC | SDC from core |
|---|---|---|
Use 1.x |
Use 2.x |
Use 2.x |
Short name
cl_generator
Supporting organizations
Development and maintenance