Skip to content

Conversation

@chrisberthe
Copy link
Contributor

@chrisberthe chrisberthe commented Jun 2, 2025

Fixes #4.

Generates component scaffolding with optional supporting files.

API

shopify theme generate component [name] [flags]

Flags

  • --assets - Generate CSS and JS assets (defaults to inline in Liquid file)
  • --asset-types=css|js|css,js - Specify which asset types to generate (defaults to both)
  • --files - Create separate CSS/JS files instead of inline references
  • --snippets=name1,name2 - Generate component snippets (e.g., "body,heading,rte")
  • --setup - Generate section and template files to preview component in component explorer
  • --type=block|element|form|layout|section|utility - Component type (can also be specified in name)
  • --force - Overwrite existing files if they exist

@chrisberthe
Copy link
Contributor Author

chrisberthe commented Jul 2, 2025

There's been some efforts over the last week to introduce cursor rules/AI with components, including generating new ones. Further work needs to happen with that before we introduce a new generate command for the CLI plugin. WIP until then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing component generation command in plugin-devkit

2 participants