Documentation
    Preparing search index...

    Options needed to run a script file as a child process

    const options: RunScriptOptions = {
    script: 'bin/server.ts',
    scriptArgs: ['--watch'],
    nodeArgs: ['--loader', 'ts-node/esm'],
    stdio: 'inherit',
    env: { NODE_ENV: 'development' },
    reject: true
    }
    type RunScriptOptions = {
        script: string;
        scriptArgs: string[];
        nodeArgs: string[];
        stdio?: "pipe" | "inherit";
        env?: NodeJS.ProcessEnv;
        reject?: boolean;
    }
    Index

    Properties

    script: string

    Path to the script file to run

    scriptArgs: string[]

    Arguments to pass to the script

    nodeArgs: string[]

    Arguments to pass to the Node.js CLI

    stdio?: "pipe" | "inherit"

    Standard input/output stream options

    env?: NodeJS.ProcessEnv

    Environment variables to pass to the child process

    reject?: boolean

    Whether to reject the promise on script failure (defaults to false)