Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "cli/process"

Index

Functions

Functions

exec

  • exec(...args: Array<string>): Promise<unknown>
  • 使用 spawn 的 shell inherit 模式,直接对接主进程的 stdio

    Parameters

    • Rest ...args: Array<string>

      命令参数,每一项可以为字符串或是字符串数组 await exec('rm', '-rf', 'node_modules') await exec('git clone', 'xxx')

    Returns Promise<unknown>

execSync

  • execSync(...args: Array<string>): void
  • 使用 spawnSync 的 shell inherit 模式,直接对接主进程的 stdio

    example

    execSync('rm', '-rf', 'node_modules') execSync('git clone', 'xxx')

    Parameters

    • Rest ...args: Array<string>

      命令参数,每一项可以为字符串或是字符串数组

    Returns void

Generated using TypeDoc