update: plugin template
This commit is contained in:
parent
bea7cc30d5
commit
150aa6f6fe
|
|
@ -19,7 +19,7 @@
|
|||
"stop": "node scripts/stop.mjs",
|
||||
"lint": "prettier --write . && eslint . --ext .ts --fix",
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"release": "release-it",
|
||||
"release": "release-it --only-version --preReleaseId=beta",
|
||||
"update-deps": "npm update --save"
|
||||
},
|
||||
"repository": {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import details from "../package.json" assert { type: "json" };
|
|||
import { Logger } from "./utils.mjs";
|
||||
import cmd from "./zotero-cmd.json" assert { type: "json" };
|
||||
import { spawn } from "child_process";
|
||||
import { existsSync, readFileSync, writeFileSync } from "fs";
|
||||
import { existsSync, readFileSync, writeFileSync, rmSync } from "fs";
|
||||
import { clearFolder } from "./utils.mjs";
|
||||
import path from "path";
|
||||
import { exit } from "process";
|
||||
|
|
@ -45,6 +45,11 @@ function prepareDevEnv() {
|
|||
writeAddonProxyFile();
|
||||
}
|
||||
|
||||
const addonXpiFilePath = path.join(profilePath, `extensions/${addonID}.xpi`);
|
||||
if (existsSync(addonXpiFilePath)) {
|
||||
rmSync(addonXpiFilePath);
|
||||
}
|
||||
|
||||
const prefsPath = path.join(profilePath, "prefs.js");
|
||||
if (existsSync(prefsPath)) {
|
||||
const PrefsLines = readFileSync(prefsPath, "utf-8").split("\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue