mirror of
https://github.com/avinal/sciezka.git
synced 2026-07-03 23:30:09 +05:30
eae5309843
TypeScript + esbuild build system, Manifest V3 with background script, content script for iframe overlay injection, and typed message contracts between extension contexts. Assisted-by: Claude Code Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
26 lines
490 B
JavaScript
26 lines
490 B
JavaScript
import * as esbuild from "esbuild";
|
|
|
|
const watch = process.argv.includes("--watch");
|
|
|
|
const options = {
|
|
entryPoints: [
|
|
"src/background.ts",
|
|
"src/content.ts",
|
|
"src/sciezka.ts",
|
|
],
|
|
bundle: true,
|
|
outdir: "dist",
|
|
format: "iife",
|
|
target: "es2020",
|
|
sourcemap: watch,
|
|
};
|
|
|
|
if (watch) {
|
|
const ctx = await esbuild.context(options);
|
|
await ctx.watch();
|
|
console.log("Watching for changes...");
|
|
} else {
|
|
await esbuild.build(options);
|
|
console.log("Build complete.");
|
|
}
|