Function: runExecutor

runExecutor<T>(targetDescription, overrides, context): Promise<AsyncIterableIterator<T>>

Loads and invokes executor.

This is analogous to invoking executor from the terminal, with the exception that the params aren't parsed from the string, but instead provided parsed already.

Apart from that, it works the same way:

  • it will load the workspace configuration
  • it will resolve the target
  • it will load the executor and the schema
  • it will load the options for the appropriate configuration
  • it will run the validations and will set the default
  • and, of course, it will invoke the executor

Example:

1for await (const s of await runExecutor( 2 { project: 'myproj', target: 'serve' }, 3 { watch: true }, 4 context 5)) { 6 // s.success 7} 8

Note that the return value is a promise of an iterator, so you need to await before iterating over it.

Type parameters

NameType
Textends Object

Parameters

NameType
targetDescriptionTarget
overridesObject
contextExecutorContext

Returns

Promise<AsyncIterableIterator<T>>