You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just started learning lerna and I think this may be something that I can do with --scope, but I'm not sure. Not even sure of the exact terms to use to search the docs. That's where I'm at learning lerna.
Let's say I have the following setup:
packages/my-comp-a [ version 1.2.1 ]
packages/my-comp-b [ version 1.3.2 ]
packages/my-comp-c [ version 1.0.7 ]
where each of the my-comp-* components has its own git repo and .gitlab-ci.yml file so that whenever I push to the main branch the yml file runs and publishes my component as an npm package in gitlab. This works fine for each individual component. Hooray lerna!
But now I also want to be able to build all of those individual components into a single dist folder and package that up as a separate my-comp-library package with its own version number, say 1.4.0 given the version numbers above. This way consumers of my components could either do npm install my-comp-a if they wanted just component A at version 1.2.1 -or- npm install my-comp-library which would give them all three components at version 1.4.0. Eventually there will be much more than 3 components, so having a library or individuals make sense to us.
Would the way to do that be to add a packages/my-comp-library with its own package.json and then make my-comp-a, b, and c dependencies of the my-comp-library? Is there a better way? I wasn't even sure what to search for, but it sounds like it is possible.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
Just started learning lerna and I think this may be something that I can do with --scope, but I'm not sure. Not even sure of the exact terms to use to search the docs. That's where I'm at learning lerna.
Let's say I have the following setup:
packages/my-comp-a [ version 1.2.1 ]
packages/my-comp-b [ version 1.3.2 ]
packages/my-comp-c [ version 1.0.7 ]
where each of the my-comp-* components has its own git repo and .gitlab-ci.yml file so that whenever I push to the main branch the yml file runs and publishes my component as an npm package in gitlab. This works fine for each individual component. Hooray lerna!
But now I also want to be able to build all of those individual components into a single dist folder and package that up as a separate my-comp-library package with its own version number, say 1.4.0 given the version numbers above. This way consumers of my components could either do
npm install my-comp-a
if they wanted just component A at version 1.2.1 -or-npm install my-comp-library
which would give them all three components at version 1.4.0. Eventually there will be much more than 3 components, so having a library or individuals make sense to us.Would the way to do that be to add a packages/my-comp-library with its own package.json and then make my-comp-a, b, and c dependencies of the my-comp-library? Is there a better way? I wasn't even sure what to search for, but it sounds like it is possible.
Thanks for any help!
Beta Was this translation helpful? Give feedback.
All reactions