mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Include all lib files in tsbuild harness
This commit is contained in:
parent
5111f4d541
commit
11df004c2c
@ -391,6 +391,14 @@ namespace ts {
|
||||
const rootPath = resolvePath(__dirname, root);
|
||||
loadFsMirror(fs, rootPath, "/src");
|
||||
fs.mkdirpSync("/lib");
|
||||
const libs = ["es5", "dom", "webworker.importscripts", "scripthost"];
|
||||
for (const lib of libs) {
|
||||
const content = Harness.IO.readFile(combinePaths(Harness.libFolder, `lib.${lib}.d.ts`));
|
||||
if (content === undefined) {
|
||||
throw new Error(`Failed to read lib ${lib}`);
|
||||
}
|
||||
fs.writeFileSync(`/lib/lib.${lib}.d.ts`, content);
|
||||
}
|
||||
fs.writeFileSync("/lib/lib.d.ts", Harness.IO.readFile(combinePaths(Harness.libFolder, "lib.d.ts"))!);
|
||||
fs.meta.set("defaultLibLocation", "/lib");
|
||||
fs.makeReadonly();
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
*/
|
||||
/lib/
|
||||
/lib/lib.d.ts
|
||||
/lib/lib.dom.d.ts
|
||||
/lib/lib.es5.d.ts
|
||||
/lib/lib.scripthost.d.ts
|
||||
/lib/lib.webworker.importscripts.d.ts
|
||||
/src/
|
||||
/src/2/
|
||||
/src/2/second-output.d.ts
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user