Skip to content

Idea: consider functions that return instances of ChildProcess  #9

@pkozlowski-opensource

Description

@pkozlowski-opensource

As of today the async function can mark its completion by calling a callback, returning a stream or a promise etc. How about adding instances of ChildProcess (http://nodejs.org/api/child_process.html#child_process_class_childprocess) to the supported list.

Having built-in ChildProcess support would allow us to have functions that spawns processes as Gulp4 tasks. The async-done could work with ChildProcess instance as follows:

  • listen to the 'exit' event and mark the task as success / error based on the exit code
  • use domains as for other event emitters to handle errors

Not sure if the exact technical solution is easy / feasible but it would be kind of cool to be able to spawn a process and have a Gulp4 task dependent on the completion of this process.

WDYT?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions