Skip to content

Commit f7cb18f

Browse files
authored
build: remove glob (#737)
1 parent 22243bd commit f7cb18f

File tree

3 files changed

+2
-97
lines changed

3 files changed

+2
-97
lines changed

package-lock.json

Lines changed: 0 additions & 87 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
"@vitest/coverage-v8": "^3.0.5",
4747
"esbuild": "^0.25.0",
4848
"fetch-mock": "^12.0.0",
49-
"glob": "^11.0.0",
5049
"prettier": "3.5.3",
5150
"proxy": "^2.0.0",
5251
"semantic-release": "^24.0.0",

scripts/build.mjs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// @ts-check
22
import esbuild from "esbuild";
33
import { copyFile, readFile, writeFile, rm } from "node:fs/promises";
4-
import { glob } from "glob";
54

65
/**
76
* @type {esbuild.BuildOptions}
@@ -19,7 +18,7 @@ async function main() {
1918
await rm("pkg", { recursive: true, force: true });
2019
// Build the source code for a neutral platform as ESM
2120
await esbuild.build({
22-
entryPoints: await glob(["./src/*.ts", "./src/**/*.ts"]),
21+
entryPoints: ["./src/*.ts", "./src/**/*.ts"],
2322
outdir: "pkg/dist-src",
2423
bundle: false,
2524
platform: "neutral",
@@ -30,13 +29,7 @@ async function main() {
3029
});
3130

3231
// Remove the types file from the dist-src folder
33-
const typeFiles = await glob([
34-
"./pkg/dist-src/**/types.js.map",
35-
"./pkg/dist-src/**/types.js",
36-
]);
37-
for (const typeFile of typeFiles) {
38-
await rm(typeFile);
39-
}
32+
await rm("pkg/dist-src/types.js");
4033

4134
// Copy the README, LICENSE to the pkg folder
4235
await copyFile("LICENSE", "pkg/LICENSE");

0 commit comments

Comments
 (0)