Reputation: 16349
I have a node / typescript application that leverages yarn workspaces. We are also using oclif for our cli.
I want to set up an architecutre where my main cli can leverge cli-plugins from the domains
\domains
\emailService
package.json
\emailServiceCLIPlugin
package.json
\authenationService
package.json
\AuthenticationServiceCLIPlugin
package.json
\cli (my mainCLI)
package.json. <--- in here I would like to plugin in the above two CLIPlugin packages
Is this possible? Or there there another good pattern that I can put into effect to get the commands from these domain libraries into my core CLI
Upvotes: 0
Views: 527
Reputation: 16349
This is possible.
You just need to add a glob pattern in your root package.json workspaces setting. then you can reference your package in the cli plugin array
Upvotes: 0