Skip to content

Commit fafbc43

Browse files
committed
fix build
1 parent b04df36 commit fafbc43

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

build.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Glob, Transpiler, fileURLToPath, pathToFileURL } from "bun";
22
import { basename, join, parse, relative } from "node:path";
3-
import { hashremap } from "./hash";
43

54
function escapeRegExp(string: string) {
65
return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
@@ -125,3 +124,8 @@ export async function build({
125124
}
126125
return result;
127126
}
127+
128+
function hashremap(input: string, hash: string) {
129+
const parsed = parse(input);
130+
return `${join(parsed.dir, parsed.name)}-${hash}${parsed.ext}`;
131+
}

scripts/dist.ts

+1
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ contents.version = spawnSync("git", ["describe", "--tags"], {
4242
.replace(/^v/, "");
4343
delete contents.devDependencies["bun-plugin-dts"];
4444
await Bun.write("dist/package.json", JSON.stringify(contents, null, 2));
45+
process.exit(0);

0 commit comments

Comments
 (0)