Skip to content

Commit

Permalink
Code optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Feb 1, 2025
1 parent 0da9014 commit 3c5ee58
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
6 changes: 1 addition & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import gulp from "gulp";
import {spawn} from "node:child_process";
import {cp, readdir, readFile, rm, writeFile} from "node:fs/promises";
import {EOL} from "node:os";
import {readdir, rm} from "node:fs/promises";
import {join} from "node:path";
import {env} from "node:process";
import pkg from "./package.json" with {type: "json"};

/** Builds the project. */
export async function build() {
await npx("tsc", "--build", "src/tsconfig.json");
await cp("src/types.d.ts", "lib/types.d.ts");
const types = await readFile("lib/index.d.ts", "utf8");
await writeFile("lib/index.d.ts", types.replace("//# sourceMappingURL", `import "./types.js";${EOL}//# sourceMappingURL`));
}

/** Deletes all generated files. */
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from "./eta.js";
export type * from "./koa.js";
export * from "./playwright.js";
File renamed without changes.

0 comments on commit 3c5ee58

Please sign in to comment.