mirror of
https://git.coom.tech/araragi/JKCS.git
synced 2024-06-26 12:42:41 +00:00
adjust webext build scripts
This commit is contained in:
parent
4ce8872cdc
commit
1cc281e964
|
@ -45,7 +45,7 @@ const manif3 = {
|
||||||
const lmanif = manif3;
|
const lmanif = manif3;
|
||||||
|
|
||||||
res = await esbuild.build({
|
res = await esbuild.build({
|
||||||
entryPoints: ["src/main.js"],
|
entryPoints: ["src/main.ts"],
|
||||||
bundle: true,
|
bundle: true,
|
||||||
treeShaking: true,
|
treeShaking: true,
|
||||||
outdir: "./chrome/dist",
|
outdir: "./chrome/dist",
|
||||||
|
@ -59,7 +59,7 @@ const manif3 = {
|
||||||
},
|
},
|
||||||
// inject: ["./esbuild.inject.js"],
|
// inject: ["./esbuild.inject.js"],
|
||||||
plugins: [],
|
plugins: [],
|
||||||
loader: { ".bin": "text", ".wasm": "binary" }, // Hacky solution for loading model.weights.bin but it works for now.
|
loader: { ".bin": "binary", ".wasm": "binary" }, // Hacky solution for loading model.weights.bin but it works for now.
|
||||||
metafile: true,
|
metafile: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ const manif3 = {
|
||||||
writeFileSync("./chrome/manifest.json", JSON.stringify(lmanif, null, 2));
|
writeFileSync("./chrome/manifest.json", JSON.stringify(lmanif, null, 2));
|
||||||
copyFileSync("./logo.png", "./chrome/1449696017588.png");
|
copyFileSync("./logo.png", "./chrome/1449696017588.png");
|
||||||
|
|
||||||
copyFileSync("./src/model.weights.bin", "./chrome/model.weights.bin");
|
copyFileSync("./src/group1-shard1of1.bin", "./chrome/group1-shard1of1.bin");
|
||||||
copyFileSync(
|
copyFileSync(
|
||||||
"./src/tfjs-backend-wasm-threaded-simd.wasm",
|
"./src/tfjs-backend-wasm-threaded-simd.wasm",
|
||||||
"./chrome/tfjs-backend-wasm-threaded-simd.wasm"
|
"./chrome/tfjs-backend-wasm-threaded-simd.wasm"
|
||||||
|
|
|
@ -50,7 +50,7 @@ const manif = {
|
||||||
let res;
|
let res;
|
||||||
|
|
||||||
res = await esbuild.build({
|
res = await esbuild.build({
|
||||||
entryPoints: ["src/main.js"],
|
entryPoints: ["src/main.ts"],
|
||||||
bundle: true,
|
bundle: true,
|
||||||
treeShaking: true,
|
treeShaking: true,
|
||||||
outdir: "./firefox/dist",
|
outdir: "./firefox/dist",
|
||||||
|
@ -64,7 +64,7 @@ const manif = {
|
||||||
},
|
},
|
||||||
// inject: ["./esbuild.inject.js"],
|
// inject: ["./esbuild.inject.js"],
|
||||||
plugins: [],
|
plugins: [],
|
||||||
loader: { ".bin": "text", ".wasm": "binary" },
|
loader: { ".bin": "binary", ".wasm": "binary" },
|
||||||
metafile: true,
|
metafile: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ const manif = {
|
||||||
writeFileSync("./firefox/manifest.json", JSON.stringify(manif, null, 2));
|
writeFileSync("./firefox/manifest.json", JSON.stringify(manif, null, 2));
|
||||||
copyFileSync("./logo.png", "./firefox/1449696017588.png");
|
copyFileSync("./logo.png", "./firefox/1449696017588.png");
|
||||||
|
|
||||||
copyFileSync("./src/model.weights.bin", "./firefox/model.weights.bin");
|
copyFileSync("./src/group1-shard1of1.bin", "./firefox/group1-shard1of1.bin");
|
||||||
copyFileSync(
|
copyFileSync(
|
||||||
"./src/tfjs-backend-wasm-threaded-simd.wasm",
|
"./src/tfjs-backend-wasm-threaded-simd.wasm",
|
||||||
"./firefox/tfjs-backend-wasm-threaded-simd.wasm"
|
"./firefox/tfjs-backend-wasm-threaded-simd.wasm"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user