-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Description
Describe what should be investigated or refactored
While working on #2395, I noticed a pattern in Pepr that seemed a little counter to how commander
composes commands and subcommands.
We should add commands to the root pepr
command by using .addCommand()
instead of our current approach of passing the entire pepr
command object into a function that adds on another subcommand. The outcome will be the same, but the way we modify the CLI structure should be more intuitive to someone unfamiliar with the project.
Links to any relevant code
Our current approach is something like:
import subcommand from "somewhere"
const program = new Command()
subcommand(program)
A preferred approach modeled in #2395 would be like:
import subcommand from "somewhere"
const program = new Command()
program.addCommand(subcommand)
Additional context
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
🆕 New