Skip to content

Commit

Permalink
perf: use quadtree to optimize element mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
brewcoua committed Jun 8, 2024
1 parent d3fdd89 commit 32660db
Show file tree
Hide file tree
Showing 16 changed files with 957 additions and 579 deletions.
13 changes: 11 additions & 2 deletions build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,28 @@ async function main() {

rmSync("dist", { recursive: true, force: true });

await Bun.build({
const result1 = await Bun.build({
entrypoints: ["./src/main.ts"],
outdir: "./dist",
plugins: [InlineStylePlugin],
});
if (!result1.success) {
result1.logs.forEach(console.log);
process.exit(1);
}
renameSync("./dist/main.js", "./dist/SoM.js");

await Bun.build({
const result2 = await Bun.build({
entrypoints: ["./src/main.ts"],
outdir: "./dist",
plugins: [InlineStylePlugin],
minify: true,
});
if (!result2.success) {
result2.logs.forEach(console.log);
process.exit(1);
}

renameSync("./dist/main.js", "./dist/SoM.min.js");
}

Expand Down
Loading

0 comments on commit 32660db

Please sign in to comment.