Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StageCommand

Hierarchy

Properties

commit

commit: boolean = Option.Boolean(`-c,--commit`, false, {description: `Commit the staged files`,})

cwd

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

dryRun

dryRun: boolean = Option.Boolean(`-n,--dry-run`, false, {description: `Print the commit message and the list of modified files without staging / committing`,})

reset

reset: boolean = Option.Boolean(`-r,--reset`, false, {description: `Remove all files from the staging area`,})

update

update: boolean = Option.Boolean(`-u,--update`, false, {hidden: true})

Static paths

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

Static usage

usage: Usage = Command.Usage({description: `add all yarn files to your vcs`,details: `This command will add to your staging area the files belonging to Yarn (typically any modified \`package.json\` and \`.yarnrc.yml\` files, but also linker-generated files, cache data, etc). It will take your ignore list into account, so the cache files won't be added if the cache is ignored in a \`.gitignore\` file (assuming you use Git).Running \`--reset\` will instead remove them from the staging area (the changes will still be there, but won't be committed until you stage them back).Since the staging area is a non-existent concept in Mercurial, Yarn will always create a new commit when running this command on Mercurial repositories. You can get this behavior when using Git by using the \`--commit\` flag which will directly create a commit.`,examples: [[`Adds all modified project files to the staging area`,`yarn stage`,], [`Creates a new commit containing all modified project files`,`yarn stage --commit`,]],})

Methods

execute

  • execute(): Promise<void>

Generated using TypeDoc