Skip to content

Latest commit

 

History

History
212 lines (158 loc) · 2.42 KB

TEMPLATES.md

File metadata and controls

212 lines (158 loc) · 2.42 KB

Templates


Commands

Replace

Replace a command (or alias) with another:

cmds: {
  command: 'to',
  alias: 'to',
}

Example

cmds: {
  remove: 'uninstall',
  r: 'uninstall',
}

Replace and add a Flag

Replace a command (or alias) with another and add a flag at the end

cmds: {
  command: ['to', '--flag'],
  alias: ['to', '--flag'],
}

Example

cmds: {
  upgrade: ['install', '--latest'],
  ug: ['install', '--latest'],
}

Not Available

Command (or alias) not available on the package manager

cmds: {
  command: ['', -1]
}

Example

cmds: {
  interactive: ['', -1]
}

Positional

add positional args separator, key (first) for search and value (second) as separator

cmds: {
  command: {'--': '--'}
}

Example

cmds: {
  run: {'--': '--'}
}

Args

Replace

Replace a flag (or shorthand) with another

args: {
  '--flag': '--to',
  '-f': '--to',
}

Example

args: {
  '--save-dev': '--dev',
  '-D': '-d',
}

Replace with a Command

Replace a flag (or shorthand) with a command and place in a specific position.

args: {
  '--flag': ['command', 1],
  '-f': ['command', 1],
}

Example

args: {
  '--global': ['global', 1],
  '-g': ['global', 1],
}

Convert to Commands

Replace a command or alias when found a flag (or shorthand). It also removes the flag.

args: {
  '--flag': {
    command: 'to',
    alias: 'to',
  }
}

Example

args: {
  '--frozen': {
    install: 'ci',
    i: 'ci',
  }
}

Remove a Command

Remove a command or alias when found a flag (or shorthand). It also removes the flag.

args: {
  '--flag': {
    command: '',
    alias: '',
  }
}

Example

args: {
  '--interactive': {
    upgrade: ''
  }
}

Package Decoration

Replace a flag with a package decoration.

args: {
    '--flag': ['<package>@decoration', 1],
    '-f': ['<package>@decoration', 1],
}

Example

args: {
  '--latest': ['<package>@latest', 1],
  '-L': ['<package>@latest', 1],
}

Not Available

Flag (or shorthand) not available on the package manager

cmds: {
  '--flag': ['', -1],
  '-f': ['', -1],
}

Example

cmds: {
  '--audit': ['', -1],
  '-A': ['', -1],
}