Options
All
  • Public
  • Public/Protected
  • All
Menu

Package plugin-pack

@yarnpkg/plugin-pack

This plugin adds support for the yarn pack command.

Install

This plugin is included by default in Yarn.

Type aliases

IgnoreList

IgnoreList: object

Type declaration

  • accept: Array<string>
  • reject: Array<string>

Variables

Const ALWAYS_IGNORE

ALWAYS_IGNORE: string[] = [`/package.tgz`,`.github`,`.git`,`.hg`,`node_modules`,`.npmignore`,`.gitignore`,`.#*`,`.DS_Store`,]

Const DEPENDENCY_TYPES

DEPENDENCY_TYPES: string[] = [`dependencies`, `devDependencies`, `peerDependencies`]

Const NEVER_IGNORE

NEVER_IGNORE: string[] = [`/package.json`,`/readme`,`/readme.*`,`/license`,`/license.*`,`/licence`,`/licence.*`,`/changelog`,`/changelog.*`,]

Const WORKSPACE_PROTOCOL

WORKSPACE_PROTOCOL: "workspace:" = `workspace:`

Functions

addIgnorePattern

  • addIgnorePattern(target: Array<string>, pattern: string, __namedParameters: object): void

Const beforeWorkspacePacking

  • beforeWorkspacePacking(workspace: Workspace, rawManifest: any): void

genPackList

  • genPackList(workspace: Workspace): Promise<(string & object)[]>

genPackStream

genPackageManifest

  • genPackageManifest(workspace: Workspace): Promise<object>

hasPackScripts

  • hasPackScripts(workspace: Workspace): Promise<boolean>

interpolateOutputName

  • interpolateOutputName(name: string, __namedParameters: object): string & object

isIgnored

  • isIgnored(cwd: string, __namedParameters: object): boolean

isMatchBasename

  • isMatchBasename(path: string, patterns: Array<string>): boolean

loadIgnoreList

matchPatternType

  • matchPatternType(path: string, patterns: Array<string>): None | Match | NegatedMatch

normalizePattern

  • normalizePattern(pattern: string, __namedParameters: object): string

prepareForPack

  • prepareForPack(workspace: Workspace, __namedParameters: object, cb: function): Promise<void>

prettyWorkspaceIdent

  • prettyWorkspaceIdent(workspace: Workspace): string

prettyWorkspaceVersion

  • prettyWorkspaceVersion(workspace: Workspace): string

walk

  • walk(initialCwd: PortablePath, __namedParameters: object): Promise<(string & object)[]>
  • Parameters

    • initialCwd: PortablePath
    • __namedParameters: object
      • globalList: object
        • accept: Array<string>
        • reject: Array<string>
      • hasExplicitFileList: boolean
      • ignoreList: object
        • accept: Array<string>
        • reject: Array<string>

    Returns Promise<(string & object)[]>

Object literals

Const plugin

plugin: object

commands

commands: PackCommand[] = [pack,]

hooks

hooks: object

beforeWorkspacePacking

beforeWorkspacePacking: beforeWorkspacePacking

Generated using TypeDoc