
* fix(deps): bump ztoolkit, scaffold and other deps - use web-ext to reload plugin - remove itembox example - update all deps * docs: add scaffold to readme and replace plugin dev documentation with zotero-chinese.com
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
import { defineConfig } from "zotero-plugin-scaffold";
|
|
import pkg from "./package.json";
|
|
|
|
export default defineConfig({
|
|
source: ["src", "addon"],
|
|
dist: "build",
|
|
name: pkg.config.addonName,
|
|
id: pkg.config.addonID,
|
|
namespace: pkg.config.addonRef,
|
|
updateURL: `https://github.com/{{owner}}/{{repo}}/releases/download/release/${
|
|
pkg.version.includes("-") ? "update-beta.json" : "update.json"
|
|
}`,
|
|
xpiDownloadLink:
|
|
"https://github.com/{{owner}}/{{repo}}/releases/download/v{{version}}/{{xpiName}}.xpi",
|
|
|
|
build: {
|
|
assets: ["addon/**/*.*"],
|
|
define: {
|
|
...pkg.config,
|
|
author: pkg.author,
|
|
description: pkg.description,
|
|
homepage: pkg.homepage,
|
|
buildVersion: pkg.version,
|
|
buildTime: "{{buildTime}}",
|
|
},
|
|
esbuildOptions: [
|
|
{
|
|
entryPoints: ["src/index.ts"],
|
|
define: {
|
|
__env__: `"${process.env.NODE_ENV}"`,
|
|
},
|
|
bundle: true,
|
|
target: "firefox115",
|
|
outfile: `build/addon/chrome/content/scripts/${pkg.config.addonRef}.js`,
|
|
},
|
|
],
|
|
},
|
|
|
|
// If you need to see a more detailed log, uncomment the following line:
|
|
// logLevel: "trace",
|
|
});
|