Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PackCommand

Hierarchy

Properties

cwd

cwd: undefined | string = Option.String(`--cwd`, {hidden: true})

dryRun

dryRun: boolean = Option.Boolean(`-n,--dry-run`, false, {description: `Print the file paths without actually generating the package archive`,})

filename

filename: undefined | string = Option.String(`--filename`, {hidden: true})

installIfNeeded

installIfNeeded: boolean = Option.Boolean(`--install-if-needed`, false, {description: `Run a preliminary \`yarn install\` if the package contains build scripts`,})

json

json: boolean = Option.Boolean(`--json`, false, {description: `Format the output as an NDJSON stream`,})

out

out: undefined | string = Option.String(`-o,--out`, {description: `Create the archive at the specified path`,})

Static paths

paths: string[][] = [[`pack`],]

Static usage

usage: Usage = Command.Usage({description: `generate a tarball from the active workspace`,details: `This command will turn the active workspace into a compressed archive suitable for publishing. The archive will by default be stored at the root of the workspace (\`package.tgz\`).If the \`-o,---out\` is set the archive will be created at the specified path. The \`%s\` and \`%v\` variables can be used within the path and will be respectively replaced by the package name and version.`,examples: [[`Create an archive from the active workspace`,`yarn pack`,], [`List the files that would be made part of the workspace's archive`,`yarn pack --dry-run`,], [`Name and output the archive in a dedicated folder`,`yarn pack --out /artifacts/%s-%v.tgz`,]],})

Methods

execute

  • execute(): Promise<0 | 1>

Generated using TypeDoc