Options
All
  • Public
  • Public/Protected
  • All
Menu

Package yarnpkg-builder

@yarnpkg/builder

A CLI tool designed for creating, building, and managing complex plugins.

This version of the builder is for creating plugins for Yarn 3.x. Yarn 3 plugins are not compatible with Yarn 2 installations, however Yarn 2 plugins are usually compatible with Yarn 3. If you wish to create plugins for Yarn 2, please use v2.x of the builder (yarn add @yarnpkg/builder@^2).

Features

  • builder new plugin command for scaffolding new plugins
  • builder build plugin command for building complex plugins
  • supports TypeScript out-of-the-box
  • uses ESBuild internally, providing treeshaking, minification, and various other optimizations out-of-the-box

Installation

yarn add -D @yarnpkg/builder

Commands

Variables

Const cli

cli: Cli<object> = new Cli({binaryLabel: `Yarn Builder`,binaryName: `builder`,binaryVersion: require(`@yarnpkg/builder/package.json`).version,})

Const execFile

execFile: __promisify__ = promisify(cp.execFile)

Const matchAll

matchAll: RegExp = /()/

Const pathRegExp

pathRegExp: RegExp = /^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:@[^/]+\/)?[^/]+)\/*(.*|)$/

Functions

findPlugins

  • findPlugins(__namedParameters: object): string[]

Const getNormalizedName

  • getNormalizedName(name: string): string

Const isDynamicLib

  • isDynamicLib(request: string): boolean

Const pkgJsonVersion

  • pkgJsonVersion(basedir: string): string

Const suggestHash

  • suggestHash(basedir: string): Promise<null | string>

Generated using TypeDoc