Skip to content

Commit

Permalink
[experiment] make tsc use the public API
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed Apr 4, 2024
1 parent 5144b3e commit edf238f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
25 changes: 13 additions & 12 deletions Herebyfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -383,18 +383,6 @@ function entrypointBuildTask(options) {
return { build, bundle, shim, main, watch };
}

const { main: tsc, watch: watchTsc } = entrypointBuildTask({
name: "tsc",
description: "Builds the command-line compiler",
buildDeps: [generateDiagnostics],
project: "src/tsc",
srcEntrypoint: "./src/tsc/tsc.ts",
builtEntrypoint: "./built/local/tsc/tsc.js",
output: "./built/local/tsc.js",
mainDeps: [generateLibs],
});
export { tsc, watchTsc };

const { main: services, build: buildServices, watch: watchServices } = entrypointBuildTask({
name: "services",
description: "Builds the typescript.js library",
Expand All @@ -408,6 +396,19 @@ const { main: services, build: buildServices, watch: watchServices } = entrypoin
});
export { services, watchServices };

const { main: tsc, watch: watchTsc } = entrypointBuildTask({
name: "tsc",
description: "Builds the command-line compiler",
buildDeps: [generateDiagnostics],
project: "src/tsc",
srcEntrypoint: "./src/tsc/tsc.ts",
builtEntrypoint: "./built/local/tsc/tsc.js",
output: "./built/local/tsc.js",
mainDeps: [generateLibs, services],
bundlerOptions: { usePublicAPI: true },
});
export { tsc, watchTsc };

export const dtsServices = task({
name: "dts-services",
description: "Bundles typescript.d.ts",
Expand Down
4 changes: 1 addition & 3 deletions src/tsc/_namespaces/ts.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
/* Generated file to emulate the ts namespace. */

export * from "../../compiler/_namespaces/ts";
export * from "../../typescript/typescript";
2 changes: 1 addition & 1 deletion src/tsc/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
},
"references": [
{ "path": "../compiler" }
{ "path": "../typescript" }
],
"include": ["**/*"]
}

0 comments on commit edf238f

Please sign in to comment.