mirror of
https://github.com/mdgriffith/elm-optimize-level-2.git
synced 2024-09-19 07:57:07 +03:00
Extract processOpts to be an argument
This commit is contained in:
parent
bd7926257d
commit
908cec2fee
@ -36,6 +36,7 @@ run(
|
||||
outputFilePath: output,
|
||||
optimizeSpeed,
|
||||
verbose,
|
||||
processOpts: { stdio: ['inherit', 'ignore', 'inherit'] },
|
||||
},
|
||||
console.log.bind(console),
|
||||
).catch((e) => {
|
||||
|
11
src/index.ts
11
src/index.ts
@ -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'] },
|
||||
},
|
||||
() => { }
|
||||
);
|
||||
}
|
||||
|
@ -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
|
||||
) {
|
||||
|
Loading…
Reference in New Issue
Block a user