Setting up a monorepo project
We'll be taking a monorepo approach to managing our project, which simply revolves around the idea of using a single repository to manage our client and server apps (and any shared libraries) instead of working with multiple repositories. We'll be using a tool called Lerna to do this. Let's get started:
- Head over to your command-line interface and run the following command to install Lerna:
npm install --global lerna
- Next, create a folder for your project and initialize Lerna using the following commands:
mkdir ngsocial cd ngsocial lerna init
You should see an output similar to the following:
lerna notice cli v4.0.0 lerna info Initializing Git repository lerna info Creating package.json lerna info Creating lerna.json lerna info Creating packages directory lerna success Initialized Lerna files
The lerna.json
file holds the configuration for Lerna, while the package.json
file contains the configuration for the whole...