Skip to content

Latest commit

 

History

History
94 lines (61 loc) · 2.26 KB

SETUP.md

File metadata and controls

94 lines (61 loc) · 2.26 KB

Setup

Prerequisites

This project is developed using Node.js, nvm and pnpm. Make sure you've got them installed in correct versions before continuing.

Versions used for development:

  • Node.js: version specified in .nvmrc file
  • pnpm: version specified in package.json file

You can find installation instructions at:

Repository clone

Clone the repository to your local machine with HTTPS:

git clone https://github.com/iLib-js/ilib-mono.git

or with SSH:

git clone git@github.com:iLib-js/ilib-mono.git

Navigate to the project root directory:

cd ilib-mono

Every command from now on should be run in the root directory of the project, unless stated otherwise.

Installation

Once Node.js, nvm and pnpm are installed, you can continue with the following steps.

1. Installing project specific Node.js version

Install and use Node.js version specified in ilib-mono/.nvmrc file. Run:

nvm use

Optional: You can add automated nvm use to shell profile. See guide here.

2. Enabling pnpm

Since v16.13, Node.js is shipping Corepack for managing package managers, so you do not need to install pnpm separately. However, this is an experimental feature, so you need to enable it by running:

corepack enable pnpm

Optional: pnpm might be hard to type, so you may use a shorter alias like pn instead. See guide here.

3. Installing project dependencies

The final step is to install the project dependencies. Run:

pnpm install

You do NOT need to run pnpm install from package directories, as the monorepo is set up to handle dependencies for all packages automatically.

4. Install Git Hooks

The project comes with a set of Git Hooks that are automatically installed as part of the post-installation process. You do not need to run a separate command for this. The hooks are set up when you run:

pnpm install

In case you need to install Git Hooks manually, you can run:

pnpm postinstall