Module

Node.ChildProcess.Simple

Package
purescript-simple-child-process
Repository
corajr/purescript-simple-child-process

This module contains simplified functions to call child processes and return their results in Aff.

It re-exports the CHILD_PROCESS effect.

import Node.ChildProcess.Simple (execAff')

main = launchAff do
  result <- execAff' "echo \"Hi\""
  log result

#execAff Source

execAff :: forall e. String -> ExecOptions -> Aff (buffer :: BUFFER, cp :: CHILD_PROCESS | e) ProcessOutput

Run a command in the shell and return its stdout and stderr as Strings.

#execAff' Source

execAff' :: forall e. String -> Aff (buffer :: BUFFER, cp :: CHILD_PROCESS | e) String

Run a command in the shell using defaultExecOptions and return its stdout as a String.

#execFileAff Source

execFileAff :: forall e. String -> Array String -> ExecOptions -> Aff (buffer :: BUFFER, cp :: CHILD_PROCESS | e) ProcessOutput

Run a command directly from a file and return its stdout and stderr as Strings.

#execFileAff' Source

execFileAff' :: forall e. String -> Array String -> Aff (buffer :: BUFFER, cp :: CHILD_PROCESS | e) String

Run a command directly from a file using defaultExecOptions and return its stdout as a String.

Re-exports from Node.ChildProcess

#CHILD_PROCESS Source

data CHILD_PROCESS :: Effect

The effect for creating and interacting with child processes.