create-component-app
create-component-app copied to clipboard
No config file detected
Hi, great project thanks! 👍🏻
I'm having an issue with using the config file. I've created it in the project root and would like to use includeStories:
config.json
{
"path": "./src/components",
"includeStories": true
}
When I run create-component-app or create-component-app --config config.json I get the message:
[Info] No config file detected, using defaults.
[Info] Your component is created!
Oddly, if I break the json formatting I get an Error, so it looks to be finding it.
༼ つ ◕_◕ ༽つ⚡ create-component-app --config config.json
[Error] An error occured while parsing your config file. Using defaults...
JSON Error in /Users/uidesign1/Documents/workspace/nbrown-ui/config.json:
Trailing comma in object at 4:1
}
^
? Do you wanna choose a template (y/N)
Any ideas please?
Hi! I’m really sorry but I can’t see what’s going on until the end of August, because I have no computer with me in holidays. I’ll be super happy to help you when I’ll come back home!
Anyway, try to use this path ./config.json instead of config.json (just to try a different way)
I'm sorry about that. Thank you so much for your help
Ah, no worries, enjoy your holidays!! 🏖 I've found a work around for now :)
Some more info that might help when you get back if it's useful:
Didn't work:
༼ つ ◕_◕ ༽つ⚡ create-component-app
[Info] No config file detected, using defaults.
Didn't work:
༼ つ ◕_◕ ༽つ⚡ create-component-app --config config.json
? Do you wanna choose a template Yes
[Info] No config file detected, using defaults.
Did work! 😍
༼ つ ◕_◕ ༽つ⚡ create-component-app --config config.json
? Do you wanna choose a template No
Config:
{
"jsExtension": "jsx",
"includeStories": true
}
Looks like using custom templates doesn't support config files for me, not sure if this is intended or not? I'll take a further look into creating my own custom template.