Add a $version global.
This commit is contained in:
parent
2fa59f14d6
commit
44d33d41ae
|
@ -35,9 +35,10 @@ const sourceDir = toAbsolutePath("../source");
|
|||
await fsp.mkdir(outDir, {recursive: true});
|
||||
|
||||
// Write the WebExtension manifest file.
|
||||
const manifest = createManifest(browser);
|
||||
await fsp.writeFile(
|
||||
path.join(outDir, "manifest.json"),
|
||||
JSON.stringify(createManifest(browser)),
|
||||
JSON.stringify(manifest),
|
||||
);
|
||||
|
||||
// Write the web-ext configuration file.
|
||||
|
@ -73,6 +74,7 @@ const options: esbuild.BuildOptions = {
|
|||
$browser: JSON.stringify(browser),
|
||||
$dev: JSON.stringify(dev),
|
||||
$test: JSON.stringify(test),
|
||||
$version: JSON.stringify(manifest.version),
|
||||
},
|
||||
entryPoints: [
|
||||
path.join(sourceDir, "background/setup.ts"),
|
||||
|
|
|
@ -12,4 +12,5 @@ declare global {
|
|||
const $browser: "chromium" | "firefox";
|
||||
const $dev: boolean;
|
||||
const $test: boolean;
|
||||
const $version: string;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue