This is an alpha, sneak peek of Monorepo Maestros. For this iteration, I'm getting all of my thoughts down. In the future, we'll have better information architecture, graphics, and other awesomeness. Your feedback is welcome!
npm
npm was the first JavaScript package manager, setting the standard for all of the package managers that we have today. npm comes bundled with the Node.js runtime and is the default package manager for the JavaScript ecosystem and supports monorepos through workspaces.
Setting up workspaces
To create your workspaces, you'll need a workspaces
field in your package.json
:
Now, any directory in your apps
and packages
directories that contains a package.json
will be treated as a workspace.
- docs (Workspace!)
- web (Workspace!)
- logger (Workspace!)
- ui (Workspace!)
To begin building packages, see the packaging page.
To begin building apps, see the applications page.
Tips and tricks
Workspace-specific commands
Say you want to run an npm command in a specific workspace. This can be done using the --workspace
argument (-w
for short). The value is your workspace's name from package.json
.