Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ghoshnirmalya/building-monorepos-using-lerna
:dragon: Sample application which shows how to build monorepos using Lerna
https://github.com/ghoshnirmalya/building-monorepos-using-lerna
Last synced: about 2 months ago
JSON representation
:dragon: Sample application which shows how to build monorepos using Lerna
- Host: GitHub
- URL: https://github.com/ghoshnirmalya/building-monorepos-using-lerna
- Owner: ghoshnirmalya
- Created: 2020-03-13T17:43:15.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-05-11T06:17:20.000Z (4 months ago)
- Last Synced: 2024-06-17T13:32:41.945Z (3 months ago)
- Language: JavaScript
- Homepage: https://buttercms.com/blog/nextjs-storybook-and-lerna-build-a-monorepo-structure
- Size: 957 KB
- Stars: 51
- Watchers: 2
- Forks: 14
- Open Issues: 16
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
This is a boilerplate for building mono-repo applications using [Lerna](https://lerna.js.org/). This mon-orepo consists of the following packages:
1. [**front-end**](https://github.com/ghoshnirmalya/building-monorepos-using-lerna/tree/master/packages/front-end): Next.js application which uses the [Button component from the component package](https://github.com/ghoshnirmalya/building-monorepos-using-lerna/blob/master/packages/front-end/pages/index.js#L2)
4. [**components**](https://github.com/ghoshnirmalya/building-monorepos-using-lerna/tree/master/packages/components): Sample React.js application with Storybook for creating a Design System**Table of Contents**
- [Overview](#overview)
- [Demo](#demo)
- [Requirements](#requirements)
- [Installation](#installation)
- [1. **Clone the application**](#1-clone-the-application)
- [2. **Install Lerna globally**](#2-install-lerna-globally)
- [3. **Bootstrap the packages**](#3-bootstrap-the-packages)
- [4. **Start the packages**](#4-start-the-packages)
- [License](#license)## Overview
This boilerplate is built using [Lerna](https://lerna.js.org/) 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](https://lerna-monorepo.now.sh/).
## Requirements
1. [Node.js](https://nodejs.org/)
2. [npm](https://www.npmjs.com/)
3. [Lerna](https://lerna.js.org/)## Installation
### 1. **Clone the application**
```sh
git clone https://github.com/ghoshnirmalya/building-monorepos-using-lerna
```### 2. **Install Lerna globally**
```sh
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:
```sh
lerna bootstrap
```### 4. **Start the packages**
From the project root, we can run the following command to start our Node.js packages:
```sh
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](https://opensource.org/licenses/MIT).