Anonymous View
Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.
This repository was archived by the owner on Aug 28, 2025. It is now read-only.

Add an interactive mode for the component generator #16

Description

@NullVoxPopuli

Let's say you want to place a component in a sub-route.
You'd do this today:

$ react g component header --route=dashboard/generators/show
installing component
  create src/ui/routes/dashboard/generators/show/-components/header/__tests__/page.ts
  create src/ui/routes/dashboard/generators/show/-components/header/__tests__/rendering-test.ts
  create src/ui/routes/dashboard/generators/show/-components/header/index.tsx
  create src/ui/routes/dashboard/generators/show/-components/header/styles.scss

what if you didn't trust your self to type the --route param correctly?

there should be an "interactive" mode for specifying the route flag.

it should be triggered when --route is present, but has no value.

it should use inquirer to allow you to crawl the routes folder and build the path via the Terminal UI.

when finishing, it should print the command it's about to run, and ask you to confirm before actually running.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions