mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
make sure ts-builder instance is being re-used
This commit is contained in:
@@ -51,8 +51,11 @@ function create(projectPath, existingOptions, config, onError = _defaultOnError)
|
||||
}
|
||||
}
|
||||
// FULL COMPILE stream doing transpile, syntax and semantic diagnostics
|
||||
let _builder;
|
||||
function createCompileStream(token) {
|
||||
const _builder = builder.createTypeScriptBuilder({ logFn }, projectPath, cmdLine);
|
||||
if (!_builder) {
|
||||
_builder = builder.createTypeScriptBuilder({ logFn }, projectPath, cmdLine);
|
||||
}
|
||||
return through(function (file) {
|
||||
// give the file to the compiler
|
||||
if (file.isStream()) {
|
||||
|
||||
@@ -73,9 +73,13 @@ export function create(
|
||||
}
|
||||
|
||||
// FULL COMPILE stream doing transpile, syntax and semantic diagnostics
|
||||
|
||||
let _builder!: builder.ITypeScriptBuilder;
|
||||
function createCompileStream(token?: builder.CancellationToken): Readable & Writable {
|
||||
|
||||
const _builder = builder.createTypeScriptBuilder({ logFn }, projectPath, cmdLine);
|
||||
if (!_builder) {
|
||||
_builder = builder.createTypeScriptBuilder({ logFn }, projectPath, cmdLine);
|
||||
}
|
||||
|
||||
return through(function (this: through.ThroughStream, file: Vinyl) {
|
||||
// give the file to the compiler
|
||||
|
||||
Reference in New Issue
Block a user