Closed macrozone closed 8 years ago
However, some generators do not have a moduleName (collections and publications), so this parameter is null there, which is a little bit ugly.
Good point. We can pass an object instead of relying on the order of the arguments.
i.e. Something like getTemplateVaraibles({ type, moduleName, fileName }, options = {})
.
We can refactor using object parameters in the long run.
i think we can merge the two functions getTestTemplateVaraibles and getTemplateVaraibles
I agree. Maybe this can be done in a separate PR.
Is this PR in conjunction with #80, or can it be merged separately?
@sungwoncho
Is this PR in conjunction with #80, or can it be merged separately?
can merge separatly, i did not use it yet in the other PR :)
Okay let's sit on it for the time being because the two are related. If merging this will make your life easier let me know.
yep, merging would be easier!
@macrozone Just merged.
@sungwoncho awesome, use it already in the other PR
I want to create generators for storybook-stories in components.
A story begins with
storiesOf('module_name.ComponentName', module)
so we need the module name available as template-variable.
This PR introduces these template-variables for components and stories.
Some things to discuss:
moduleName: CamelCaseModul moduleFileName: snake_case_modul