arminbro / generate-react-cli

A simple React CLI to generate components instantly and more.

Home Page:https://www.npmjs.com/package/generate-react-cli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Whenever i try to create a component in a subfolder the subfolder declarations appear on the component declaration.

tomkidumbuyo opened this issue · comments

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Machine (please complete the following information):

  • OS: [e.g. macOS Mojave]
  • Node Version [e.g. v10.16.1]

Additional context
Add any other context about the problem here.

Screenshots
If applicable, add screenshots to help explain your problem.

HI @tomkidumbuyo,

I believe you're looking for the --flat flag. You'll find it in the options table.

Example:

npx generate-react-cli component Box --flat

That command will generate the component files without a directory.

I will close this ticket now, as I believe this flag resolves your request.