
* refactor: add dev server and fix `update-beta.json` bug
* chore: add renovate config
* feat: release plugin to GitHub release via action
* chore: update vsc settings
* Cancel release by action
* docs: update readme
* Update README.md
* Update README.md
fix format
* Update README.md
* Update README.md
fix hint
* tweak
* Merge #81
* Fix indent
* Merge ade49628ff
* Revent delete env
* tweak
* feat: release via GitHub action
* docs: update readme
* Update README.md
* style: fix prettier
* add: stdout log to file
* Update README.md
fix typo
* Update release.yml
fix typo
* write Zotero log to `logs/zotero.log`
* do not provide update-beta.json default
* fix prettier in readme
* tweak
* fix wrong link in readme
* Move 3rd package config to package.json
---------
Co-authored-by: windingwind <33902321+windingwind@users.noreply.github.com>
27 lines
564 B
JavaScript
27 lines
564 B
JavaScript
import { Logger, isRunning } from "./utils.mjs";
|
|
import cmd from "./zotero-cmd.json" assert { type: "json" };
|
|
import { execSync } from "child_process";
|
|
import process from "process";
|
|
|
|
const { killZoteroWindows, killZoteroUnix } = cmd;
|
|
|
|
isRunning("zotero", (status) => {
|
|
if (status) {
|
|
killZotero();
|
|
} else {
|
|
Logger.warn("No Zotero running.");
|
|
}
|
|
});
|
|
|
|
function killZotero() {
|
|
try {
|
|
if (process.platform === "win32") {
|
|
execSync(killZoteroWindows);
|
|
} else {
|
|
execSync(killZoteroUnix);
|
|
}
|
|
} catch (e) {
|
|
Logger.error(e);
|
|
}
|
|
}
|