-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
provide a config file to the custom-template #47
Comments
I also need this feature for stories. We are using the atomic design pattern and need to be able to generate stories with export default {
title: '${folder}/TemplateName',
component: TemplateName,
} as ComponentMeta<Component>; for like For now I guess I'll use a node script to |
Not sure if this is still an issue. But have you considered using different templates for this? For Example {
...
"atom": {
"path": "src/components/atoms",
"withLazy": true,
"withStory": true,
"withStyle": true,
"withTest": true,
"withTypes": true,
"withConfig": true,
"customTemplates": {
"component": "src/templates/atoms/TemplateName.tsx",
"config": "src/templates/atoms/TemplateName.config.ts",
"lazy": "src/templates/atoms/TemplateName.lazy.tsx",
"story": "src/templates/atoms/TemplateName.stories.tsx",
"style": "src/templates/atoms/TemplateName.module.css",
"test": "src/templates/atoms/TemplateName.test.tsx",
"types": "src/templates/atoms/TemplateName.types.ts"
}
},
"atom-subtype1": {
"path": "src/components/atoms",
"withLazy": true,
"withStory": true,
"withStyle": true,
"withTest": true,
"withTypes": true,
"withConfig": true,
"customTemplates": {
"component": "src/templates/atoms/subtype-1/TemplateName.tsx",
"config": "src/templates/atoms/TemplateName.config.ts",
"lazy": "src/templates/atoms/TemplateName.lazy.tsx",
"story": "src/templates/atoms/TemplateName.stories.tsx",
"style": "src/templates/atoms/TemplateName.module.css",
"test": "src/templates/atoms/TemplateName.test.tsx",
"types": "src/templates/atoms/TemplateName.types.ts"
}
},
"molecule": {
...
},
"particle": {
...
},
// etc
...
} Though - if @arminbro agrees - I could see a post processor option work here and I might be interested in submitting a PR for that. |
Is your feature request related to a problem? Please describe.
I mean, it helps a lot when you can add a custom template. But if it is possible to provide a config file to our custom templates, like a regular exp replace or to generate a comonent with more options
for example
there are so many pages with the same layout, but diff in some details like a seach form with different fields , or table with unlike columns
The text was updated successfully, but these errors were encountered: