(
filePath: string,
{ isolateCompiler = true }: CompileFileOptions = {},
)
| 14 | * Throws on compilation errors. |
| 15 | */ |
| 16 | export async function compileFile( |
| 17 | filePath: string, |
| 18 | { isolateCompiler = true }: CompileFileOptions = {}, |
| 19 | ): Promise<void> { |
| 20 | const workerPath = path.resolve(__dirname, 'compilerWorker.js') |
| 21 | if (isolateCompiler) { |
| 22 | await execaNode(workerPath, [filePath]) |
| 23 | } else { |
| 24 | const compile = require(workerPath) as (filePath: string) => void |
| 25 | compile(filePath) |
| 26 | } |
| 27 | } |
no outgoing calls
no test coverage detected