0

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

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
Jonathan
  • 16,077
  • 12
  • 67
  • 106

1 Answers1

0

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

Jonathan
  • 16,077
  • 12
  • 67
  • 106
  • somewhat related but have you tried running the ``oclif-dev pack`` command on the monorepo? can't seem to get it to work and there's an issue with no response https://github.com/oclif/oclif/issues/145 – dardardardar Jul 11 '21 at 04:52