Skip to content

Conversation

pradhumn17
Copy link

  • Added a prompt to allow users to enable .jsx file formats.
  • Modified code of generateComponentUtils file to allow .jsx file extension.
  • Updated documentation to reflect the new .jsx support option.

- Added a prompt to allow users to enable .jsx file formats.
- Modified code of generateComponentUtils file to allow .jsx file extension.
- Updated documentation to reflect the new .jsx support option.
@TyIsI
Copy link
Contributor

TyIsI commented Oct 4, 2025

Hey, just a curious committer here...

What is the advantage of this over using templates to specify a jsx file?

Like so?

{
  "usesTypeScript": false,
  "usesCssModule": true,
  "cssPreprocessor": "scss",
  "testLibrary": "Testing Library",
  "component": {
    "default": {
      "customTemplates": {
        "component": "templates/component/TemplateName.jsx",
        "story": "templates/component/TemplateName.stories.jsx",
        "style": "templates/component/TemplateName.style.scss",
        "test": "templates/component/TemplateName.test.js"
      },
      "path": "src/components",
      "withStyle": true,
      "withTest": true,
      "withStory": true,
      "withLazy": false
    }
  }
}

This way you can more easily change formats in general without too much more overhead.
This would then also work if someone were to use GRC to generate MDX files.

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.

2 participants