CLI Command to Generate Routes #66608
Abdel-Monaam-Aouini
started this conversation in
Ideas
Replies: 1 comment
-
This gives me Angular vibes, but I feel like it takes the same amount of time to create the directories + page as typing the cli command.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-Goals
Background
:)
Proposal
Description
I would like to request a new CLI command for the Next.js framework that simplifies the process of generating route files and folders. The proposed command, next generate route, would take a specified route as input and automatically create the appropriate directory structure and files needed for Next.js routing.
Proposed Command
next generate route <route-path>
For example, running the following command:
next generate route /posts/:postID
Should result in the creation of the following structure:
/pages/posts/[postID].js
Beta Was this translation helpful? Give feedback.
All reactions