This cl tool can be installed as a devDependency. But they say to install it as a dependency if you are in a monorepo.
Why is that?
devDependencies
in the root package.json can be used in all packages in the monorepo. This is generally used to co-locate test-related deps and config (jest, eslint, etc).
A couple caveats:
devDependencies
. If you need to run a
CLI from a child package, that CLI needs to be in that package's
devDependencies. (transpiling, flowcopy, etc)dependencies
for a
given child package still need to be listed in that child's
package.json. (obvious, perhaps? just clarifying)Source: https://github.com/lerna/lerna/issues/1079#issuecomment-337660289