Yarn workspaces could save you the common linking step. :)
Came to write exactly this. Workspaces with Lerna can really help organize and manage the monorepo.
What you need to add to the root package.json:
package.json
"workspaces": [ "packages/*" ],
Then remove all node_modules folders in the mono-repo, remove the package-lock.json file and then run yarn in the root directory.
node_modules
package-lock.json
yarn
Example with yarn workspaces and lerna
is there anything like this for NPM ?
Thanks a lot! I'll give this a try. This is exactly what I am trying to do.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yarn workspaces could save you the common linking step. :)
Came to write exactly this. Workspaces with Lerna can really help organize and manage the monorepo.
What you need to add to the root
package.json
:Then remove all
node_modules
folders in the mono-repo, remove thepackage-lock.json
file and then runyarn
in the root directory.Example with yarn workspaces and lerna
is there anything like this for NPM ?
Thanks a lot! I'll give this a try. This is exactly what I am trying to do.