This is a boilerplate for building mono-repo applications using Lerna. This mon-orepo consists of the following packages:
- front-end: Next.js application which uses the Button component from the component package
- components: Sample React.js application with Storybook for creating a Design System
Table of Contents
Overview
This boilerplate is built using Lerna for managing all the packages in a simple manner. Because of Lerna, it becomes very easy to install, develop and maintain a mono-repo structure.
Demo
A demo of this application is hosted here.
Requirements
Installation
1. Clone the application
git clone https://github.com/ghoshnirmalya/building-monorepos-using-lerna
2. Install Lerna globally
npm install --global lerna
3. Bootstrap the packages
From the project root, we can run the following command to bootstrap the packages and install all their dependencies and linking any cross-dependencies:
lerna bootstrap
4. Start the packages
From the project root, we can run the following command to start our Node.js packages:
lerna run dev --parallel
The above command will do the following:
a. Start the front-end package on [http://localhost:3000/](http://localhost:3000).
b. Start watching changes for the components package
License
This project is licensed under the MIT License.