Extract processOpts to be an argument

This commit is contained in:
Jeroen Engels 2021-10-01 23:41:48 +02:00
parent bd7926257d
commit 908cec2fee
3 changed files with 11 additions and 2 deletions

View File

@ -36,6 +36,7 @@ run(
outputFilePath: output,
optimizeSpeed,
verbose,
processOpts: { stdio: ['inherit', 'ignore', 'inherit'] },
},
console.log.bind(console),
).catch((e) => {

View File

@ -3,10 +3,17 @@ import * as Run from './run';
export async function run(options: {
inputFilePath: string | undefined,
outputFilePath: string | null,
optimizeSpeed: boolean
optimizeSpeed: boolean,
processOpts: {
stdio: [string, string, string],
} | null,
}) {
return Run.run(
{ ...options, verbose: false },
{
...options,
verbose: false,
processOpts: options.processOpts || { stdio: ['inherit', 'ignore', 'inherit'] },
},
() => { }
);
}

View File

@ -15,6 +15,7 @@ export async function run(
outputFilePath: string | null,
optimizeSpeed: boolean,
verbose: boolean,
processOpts: { stdio: [string, string, string] },
},
log: (message?: any, ...optionalParams: any[]) => void
) {