Skip to content

How does Lerna detect packages? #3685

Answered by fahslaj
christianmalek asked this question in Q&A
Discussion options

You must be logged in to vote

You can definitely add server projects to the same lerna repo as your client ones. One example structure would be like this:

foo/client/package-1 (with package.json)
foo/client/package-2 (with package.json)
foo/client/package-3 (with package.json)

foo/server/package-4 (with package.json)
foo/server/package-5 (with package.json)
foo/server/package-6 (with package.json)

foo/package.json (this is the root package.json with the "workspaces" property)
foo/lerna.json

Your package.json's workspaces property would be set to ["client/*", "server/*"] and the "useWorkspaces" property in lerna.json would be set to true.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by christianmalek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants