Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RunCommand

Hierarchy

Properties

args

args: string[] = Option.Proxy()

binariesOnly

binariesOnly: boolean = Option.Boolean(`-B,--binaries-only`, false, {description: `Ignore any user defined scripts and only check for binaries`,})

cwd

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

inspect

inspect: string | false | true = Option.String(`--inspect`, false, {tolerateBoolean: true,description: `Forwarded to the underlying Node process when executing a binary`,})

inspectBrk

inspectBrk: string | false | true = Option.String(`--inspect-brk`, false, {tolerateBoolean: true,description: `Forwarded to the underlying Node process when executing a binary`,})

require

require: undefined | string = Option.String(`--require`, {description: `Forwarded to the underlying Node process when executing a binary`,})

scriptName

scriptName: string = Option.String()

silent

silent: undefined | false | true = Option.Boolean(`--silent`, {hidden: true})

topLevel

topLevel: boolean = Option.Boolean(`-T,--top-level`, false, {description: `Check the root workspace for scripts and/or binaries instead of the current one`,})

Static paths

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

Static usage

usage: Usage = Command.Usage({description: `run a script defined in the package.json`,details: `This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace:- If the \`scripts\` field from your local package.json contains a matching script name, its definition will get executed.- Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed.- Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed.Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax).`,examples: [[`Run the tests from the local workspace`,`$0 run test`,], [`Same thing, but without the "run" keyword`,`$0 test`,], [`Inspect Webpack while running`,`$0 run --inspect-brk webpack`,]],})

Methods

execute

  • execute(): Promise<number>

Generated using TypeDoc