monstar-lab-oss / ml-frontend

A monorepo created to provide a starter kit for front-end projects at Monstar Lab, Inc.
https://www.npmjs.com/package/start-frontend
Mozilla Public License 2.0
14 stars 1 forks source link

[FEATURE] Extract router module from react/base, and use plop to generate it #1264

Open ptrkdan opened 5 months ago

ptrkdan commented 5 months ago

Is your feature request related to a problem? Please describe.

wouter is currently included in react/base. It is possible that users may not want a router solution for their project, so the current implementation would only bloat the generated project.

Additionally, since we are currently revising the generation script to use plop, it would be a good opportunity to try implementing this via plop.

Describe the solution you'd like

  1. Extract router related code from react/base as its own module
  2. Add "Add router" in the module selection of the CLI script.
  3. Add additional CLI prompt to select which router solution to use, if the user selects the "Add router" selection. a. Add both wouter and react-router selection
  4. Add handlebar templates for wouter and react-router modules.
  5. Add plop generator for the router module.

Additional context (optional)

Add any other context or screenshots about the feature request here.