Closed vb closed 7 years ago
Hi @viktorbergehall ! Yes, you are right.
I'm creating a .md file with more details about the custom templates.
Thanks for your support 🚀
Hi @viktorbergehall !
I created a doc file to create custom templates. Give me some feedbacks 👍
Thanks for the guide!
A couple of thoughts:
# config.json
{
"path": "./src/components",
"jsExtension": "js",
"cssExtension": "scss",
"includeTests": true,
"includeStories": true,
"type": "custom",
"templatesPath": ".ccarc/templates"
}
.ccarc/config.json
(or something) rather than you'd have to specify it with the config flag.# config.json
{
...
file_name: {
test: 'COMPONENT_NAME.test.js',
etc
}
}
I'm running create-react-app
and that looks for test files with the naming *.test.js
so files name *.tests.js
doesn't run by default
How do you specify pure/stateless/class in templates ?
If you collect all settings in one file then the settings doesn't seem to apply
With type custom
you can't specify from the config the type because I can't know what are you writing in your template.
So, the only options that you can use when you use type:custom
are:
The other will be ignore because you are writing your own templates, and in your templates folder you can put whatever you want 👍 .
It would be great if the script defaulted to look for settings in .ccarc/config.json (or something) rather than you'd have to specify it with the config flag.
It is already in this way 🙂 If doesn't work give me additional information to fix the bug 💪
It would be great if you could specify file name for each file.
Cool 🌮 Do you want contribute with this enhancement ?
I'm running create-react-appand that looks for test files with the naming .test.js so files name .tests.js doesn't run by default
Sorry, but I don't understand what you mean 🙁
Thanks a lot for your support. If there are other issue/questions I'm here 🎉
Hi @viktorbergehall If you don't have any question, I'm closing the issue
Thanks a lot for your contribute 🙂
The description on how to create custom templates is pretty thin. Could you provide a more detailed example?