Skip to content

Commit edf238f

Browse files
committed
[experiment] make tsc use the public API
1 parent 5144b3e commit edf238f

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

Herebyfile.mjs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -383,18 +383,6 @@ function entrypointBuildTask(options) {
383383
return { build, bundle, shim, main, watch };
384384
}
385385

386-
const { main: tsc, watch: watchTsc } = entrypointBuildTask({
387-
name: "tsc",
388-
description: "Builds the command-line compiler",
389-
buildDeps: [generateDiagnostics],
390-
project: "src/tsc",
391-
srcEntrypoint: "./src/tsc/tsc.ts",
392-
builtEntrypoint: "./built/local/tsc/tsc.js",
393-
output: "./built/local/tsc.js",
394-
mainDeps: [generateLibs],
395-
});
396-
export { tsc, watchTsc };
397-
398386
const { main: services, build: buildServices, watch: watchServices } = entrypointBuildTask({
399387
name: "services",
400388
description: "Builds the typescript.js library",
@@ -408,6 +396,19 @@ const { main: services, build: buildServices, watch: watchServices } = entrypoin
408396
});
409397
export { services, watchServices };
410398

399+
const { main: tsc, watch: watchTsc } = entrypointBuildTask({
400+
name: "tsc",
401+
description: "Builds the command-line compiler",
402+
buildDeps: [generateDiagnostics],
403+
project: "src/tsc",
404+
srcEntrypoint: "./src/tsc/tsc.ts",
405+
builtEntrypoint: "./built/local/tsc/tsc.js",
406+
output: "./built/local/tsc.js",
407+
mainDeps: [generateLibs, services],
408+
bundlerOptions: { usePublicAPI: true },
409+
});
410+
export { tsc, watchTsc };
411+
411412
export const dtsServices = task({
412413
name: "dts-services",
413414
description: "Bundles typescript.d.ts",

src/tsc/_namespaces/ts.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
/* Generated file to emulate the ts namespace. */
2-
3-
export * from "../../compiler/_namespaces/ts";
1+
export * from "../../typescript/typescript";

src/tsc/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"compilerOptions": {
44
},
55
"references": [
6-
{ "path": "../compiler" }
6+
{ "path": "../typescript" }
77
],
88
"include": ["**/*"]
99
}

0 commit comments

Comments
 (0)