mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-01 10:22:25 +00:00
Inline beacon fonts to avoid binary artifacts
This commit is contained in:
1 parent
13d202e1af
commit
7d1c77e4ba
13 files changed
+2849
-46
No files matched your search
Executable
+35
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import { build } from "esbuild";
|
||||
import { mkdir } from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
const repoRoot = path.resolve(__dirname, "..");
|
||||
const entryPoint = path.join(repoRoot, "torrent/src/beacon-vendor.js");
|
||||
const outDir = path.join(repoRoot, "torrent/dist");
|
||||
|
||||
await mkdir(outDir, { recursive: true });
|
||||
|
||||
await build({
|
||||
bundle: true,
|
||||
entryPoints: { "beacon.vendor": entryPoint },
|
||||
outdir: outDir,
|
||||
format: "iife",
|
||||
platform: "browser",
|
||||
target: ["es2019"],
|
||||
minify: true,
|
||||
sourcemap: false,
|
||||
entryNames: "[name]",
|
||||
loader: {
|
||||
".css": "css",
|
||||
".woff": "dataurl",
|
||||
".woff2": "dataurl",
|
||||
".ttf": "dataurl",
|
||||
".eot": "dataurl",
|
||||
".svg": "dataurl",
|
||||
},
|
||||
logLevel: "info",
|
||||
});
|
||||
@@ -13,7 +13,6 @@ const IGNORED_DIRS = new Set([
|
||||
".git",
|
||||
"node_modules",
|
||||
"vendor",
|
||||
"torrent",
|
||||
"dist",
|
||||
"build",
|
||||
".next",
|
||||
|
||||
Reference in new issue
Block a user