verdaccio/docs/development.md

1.5 KiB

Development notes

The 5.x still under development, key points:

Ensure you have nvm installed or the latest Node.js (check .nvmrc for mode details).

nvm install

Verdaccio uses pnpm as monorepo management. To install

npm i -g pnpm@latest

Install all needed packages

pnpm install

For building the application:

pnpm build

Running the test

pnpm test

Running the application (with UI hot reloading)

pnpm start

with hot reloading (server and UI), nodemon will restart the server and babel runs in watch mode.

pnpm start:watch

Running with ts-node

pnpm start:ts

Running the Website

We use Gatsbyjs as development stack for website, please for more information check their official guidelines.

pnpm website:develop

Running E2E

For running the CLI test

pnpm test:e2e:cli

For running the UI test

pnpm test:e2e:ui

Linting

Linting the code.

pnpm lint

For website runs

pnpm website:lint

Formatting the code with prettier

pnpm prettier

Debugging

Run the server in debug mode (it does not include UI hot reload) with --inspect support.

pnpm debug
pnpm debug:break

requires pnpm build previously

debug internal output

Each verdaccio module uses debug, use the namespaces in combination with filters to get a verbose output about each action, for example:

DEBUG=verdaccio:* pnpm start