utils/index.js
function runCommand(cmd, args, options) {
  return new Promise((resolve, reject) => {
    const spwan = spawn(
      cmd,
      args,
      Object.assign(
        {
          cwd: process.cwd(),
          stdio: 'inherit',
          shell: true,
        },
        options
      )
    )

    spwan.on('exit', () => {
      resolve()
    })
  })
}
function runCommand(cmd, args, options) {
  return new Promise((resolve, reject) => {
    const spwan = spawn(
      cmd,
      args,
      Object.assign(
        {
          cwd: process.cwd(),
          stdio: 'inherit',
          shell: true,
        },
        options
      )
    )

    spwan.on('exit', () => {
      resolve()
    })
  })
}
function runCommand ( cmd , args , options ) { return new Promise ( ( resolve , reject ) => { const spwan = spawn ( cmd , args , Object . assign ( { cwd : process . cwd ( ) , stdio : 'inherit' , shell : true , } , options ) ) spwan . on ( 'exit' , ( ) => { resolve ( ) } ) } ) }
Spawns a child process and runs the specified command
By default, runs in the CWD and inherits stdio
Options are the same as node's child_process.spawn
@param {string} cmd
@param {array<string>} args
@param {object} options
Spawns a child process and runs the specified command By default runs in the CWD and inherits stdio Options are the same as node s child_process . spawn