Skip to content

Commit

Permalink
Maybe fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Mar 28, 2023
1 parent 471bf80 commit 98b9970
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions packages/common/scripts/bundleLocalTs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { tsMorph } from "./deps.ts";
import { folders, path, tsMorph } from "./deps.ts";
const { Node, Project } = tsMorph;

const project = new Project();
Expand All @@ -19,8 +19,9 @@ for (const varDecl of commonFile.getVariableDeclarations()) {

commonFile.saveSync();

fileSystem.copySync("node_modules/typescript/lib/typescript.js", "./dist/typescript.js");
fileSystem.copySync("node_modules/typescript/lib/typescript.d.ts", "./lib/typescript.d.ts");
const typescriptLibFolderPath = path.join(folders.root, "node_modules/typescript/lib");
fileSystem.copySync(path.join(typescriptLibFolderPath, "typescript.js"), "./dist/typescript.js");
fileSystem.copySync(path.join(typescriptLibFolderPath, "typescript.d.ts"), "./lib/typescript.d.ts");

// add a _nodeWithTypeArgumentsBrand to NodeWithTypeArguments
// in order to distinguish it from TypeNode
Expand Down
2 changes: 1 addition & 1 deletion packages/common/scripts/createLibFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { ts } = tsMorph;

const libFilesFilePath = path.join(folders.common, "src/data/libFiles.ts");
// todo: grab this from the TypeScript repo's tag
const libFolderPath = path.join(folders.common, "node_modules/typescript/lib");
const libFolderPath = path.join(folders.root, "node_modules/typescript/lib");
const minifier = createDtsMinifier(ts);

let libFileText = "// dprint-ignore-file\nexport const libFiles: { fileName: string; text: string; }[] = [";
Expand Down

0 comments on commit 98b9970

Please sign in to comment.