diff options
| author | Kitson Kelly <me@kitsonkelly.com> | 2018-12-07 05:01:15 +1100 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2018-12-06 10:01:15 -0800 |
| commit | 6cc89b9e272440d93b6354f098031c3a22803686 (patch) | |
| tree | 4589fb19088386f049ed8c6f488386772dd27684 /tools/ts_library_builder | |
| parent | 60c008d23b2bdad333711b43148a5053e83a62cc (diff) | |
Use alternate TextEncoder/TextDecoder implementation (#1281)
This is faster and smaller.
Diffstat (limited to 'tools/ts_library_builder')
| -rw-r--r-- | tools/ts_library_builder/build_library.ts | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/tools/ts_library_builder/build_library.ts b/tools/ts_library_builder/build_library.ts index e1a64215f..00e942540 100644 --- a/tools/ts_library_builder/build_library.ts +++ b/tools/ts_library_builder/build_library.ts @@ -13,7 +13,6 @@ import { addInterfaceProperty, addSourceComment, addVariableDeclaration, - appendSourceFile, checkDiagnostics, flattenNamespace, getSourceComment, @@ -370,18 +369,13 @@ export function main({ moduleResolution: ModuleResolutionKind.NodeJs, noLib: true, strict: true, - target: ScriptTarget.ESNext, - types: ["text-encoding"] + target: ScriptTarget.ESNext }, useVirtualFileSystem: true }); // There are files we need to load into memory, so that the project "compiles" loadDtsFiles(outputProject); - // tslint:disable-next-line:max-line-length - const textEncodingFilePath = `${buildPath}/node_modules/@types/text-encoding/index.d.ts`; - loadFiles(outputProject, [textEncodingFilePath]); - outputProject.addExistingSourceFileIfExists(textEncodingFilePath); // libDts is the final output file we are looking to build and we are not // actually creating it, only in memory at this stage. @@ -433,16 +427,6 @@ export function main({ console.log(`Merged "globals" into global scope.`); } - // Since we flatten the namespaces, we don't attempt to import `text-encoding` - // so we then need to concatenate that onto the `libDts` so it can stand on - // its own. - const textEncodingSourceFile = outputProject.getSourceFileOrThrow( - textEncodingFilePath - ); - appendSourceFile(textEncodingSourceFile, libDTs); - // Removing it from the project so we know the libDTs can stand on its own. - outputProject.removeSourceFile(textEncodingSourceFile); - // Add the preamble libDTs.insertStatements(0, libPreamble); |
