Skip to content

Commit

Permalink
update: plugin template
Browse files Browse the repository at this point in the history
  • Loading branch information
windingwind committed Jan 1, 2024
1 parent 8f6e90b commit d887e23
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,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": {
Expand Down
7 changes: 6 additions & 1 deletion scripts/start.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit d887e23

Please sign in to comment.