Skip to content

Introduction

generator-verdaccio-plugin is a Yeoman generator that scaffolds Verdaccio plugins with TypeScript and a ready-to-use project structure.

Requirements

Installation

bash
npm install -g yo generator-verdaccio-plugin

Quick Start

bash
yo verdaccio-plugin

The generator walks you through a short set of prompts and creates a verdaccio-<name>/ directory with everything you need.

Interactive Prompts

PromptDescription
Plugin typeauth, storage, middleware, or filter
Plugin nameSuffix after verdaccio- — e.g. my-plugin produces verdaccio-my-plugin
DescriptionShort description added to package.json
GitHub username / orgPopulates the repository field in package.json
Author name & emailStored locally and reused in future runs
KeywordsComma-separated; verdaccio is always appended automatically

Generated Project Structure

verdaccio-<name>/
├── src/
│   ├── index.ts          # Re-exports the plugin class
│   └── *-plugin.ts       # Main plugin implementation
├── types/
│   └── index.d.ts        # Custom configuration types
├── .editorconfig
├── .gitignore
├── .npmignore
├── .nvmrc
├── package.json
├── README.md
└── tsconfig.json

Build & Publish

bash
cd verdaccio-<name>
npm install
npm run build

# publish to your own Verdaccio instance for testing
npm publish --registry http://localhost:4873

Then add the plugin to your verdaccio.yaml, install it in the Verdaccio instance and restart.

Released under the MIT License.