src/cli.js
async function run () {
  const pkg = await readJson(path.join(options.cwd, 'package.json'))
  const tasks = await hela({ pkg, ...options })
  const name = options.taskName

  if (Object.keys(tasks).length === 0) {
    throw new Error('hela: no tasks')
  }

  const hasOwn = (o, k) => Object.prototype.hasOwnProperty.call(o, k)
  if (!hasOwn(tasks, name)) {
    throw new Error(`hela: no such task -> ${name}`)
  }

  return tasks[name]()
}
async function run () {
  const pkg = await readJson(path.join(options.cwd, 'package.json'))
  const tasks = await hela({ pkg, ...options })
  const name = options.taskName

  if (Object.keys(tasks).length === 0) {
    throw new Error('hela: no tasks')
  }

  const hasOwn = (o, k) => Object.prototype.hasOwnProperty.call(o, k)
  if (!hasOwn(tasks, name)) {
    throw new Error(`hela: no such task -> ${name}`)
  }

  return tasks[name]()
}
async function run ( ) { const pkg = await readJson ( path . join ( options . cwd , 'package.json' ) ) const tasks = await hela ( { pkg , ... options } ) const name = options . taskName if ( Object . keys ( tasks ) . length === 0 ) { throw new Error ( 'hela: no tasks' ) } const hasOwn = ( o , k ) => Object . prototype . hasOwnProperty . call ( o , k ) if ( ! hasOwn ( tasks , name ) ) { throw new Error ( ` ${ name } ` ) } return tasks [ name ] ( ) }
if (!isNyc && !isCov && !isEslint) { console.error(`hela: task "${name}" failed`) console.error(er.stack || er.message) } }
if ( !isNyc && !isCov && !isEslint ) { console . error ( hela : task $ { name } failed ) console . error ( er . stack || er . message ) } }