Skip to content
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

No config file detected #79

Open
s10wen opened this issue Aug 14, 2019 · 2 comments
Open

No config file detected #79

s10wen opened this issue Aug 14, 2019 · 2 comments

Comments

@s10wen
Copy link

s10wen commented Aug 14, 2019

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?

@CVarisco
Copy link
Owner

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

@s10wen
Copy link
Author

s10wen commented Aug 15, 2019

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.

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

No branches or pull requests

2 participants