mirror of
https://github.com/westerngua/obsidian-zotero-citations.git
synced 2026-07-22 06:51:52 +00:00
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Codex <noreply@openai.com>
19 lines
726 B
JavaScript
19 lines
726 B
JavaScript
import { readFileSync, writeFileSync } from "fs";
|
|
|
|
const packageJson = JSON.parse(readFileSync("package.json", "utf8"));
|
|
const manifestJson = JSON.parse(readFileSync("manifest.json", "utf8"));
|
|
const versionsJson = JSON.parse(readFileSync("versions.json", "utf8"));
|
|
|
|
const targetVersion = packageJson.version;
|
|
|
|
if (!targetVersion) {
|
|
throw new Error("package.json is missing a version field");
|
|
}
|
|
|
|
manifestJson.version = targetVersion;
|
|
writeFileSync("manifest.json", `${JSON.stringify(manifestJson, null, 2)}\n`);
|
|
|
|
versionsJson[targetVersion] = manifestJson.minAppVersion;
|
|
writeFileSync("versions.json", `${JSON.stringify(versionsJson, null, 2)}\n`);
|
|
|
|
console.log(`Synced manifest.json and versions.json to ${targetVersion}`);
|