import {launch} from '@01/launcher'
await launch({
cmds:['echo', 'Hello']
})
type Options = {
env?: string | string[];
cmds?: string[];
cwd?: string;
mode?: LaunchMode;
exitProcessOnClose?: boolean;
silent?: boolean;
} & SpawnOptions;
Option to pass custom environment variable to child process.
env:'ENV_VAR=value'
env:['ENV1=v1', 'ENV2=v2']
env:'ENV1=v1,ENV2=v2'
Child process cmd with arguments. First element is the program location or name and remaining elements are it's arguments.
cmds: ['echo', 'Hello']
Current working directory. Path is absolute if it's starts with slash /
otherwise relative.
cwd: './relative/path'
cwd: '/absolute/path'
Launch mode
cli
Exit program on exceptionsprogram
Throw error on exceptions
Exit parent node process on close.
Skip verbose logs