mirror of
https://github.com/westerngua/obsidian-zotero-citations.git
synced 2026-07-22 06:51:52 +00:00
2 KiB
2 KiB
Development Guide
This plugin directory now follows a more standard Obsidian plugin source-repo layout while still remaining directly loadable by Obsidian.
Directory Map
zotero-citations/
├── assets/screenshots/ # README images
├── docs/ # Project docs
├── src/ # TypeScript source
├── CHANGELOG.md
├── LICENSE
├── README.md
├── README_EN.md
├── RELEASE_NOTES.md
├── esbuild.config.mjs
├── manifest.json
├── package.json
├── package-lock.json
├── styles.css # Runtime stylesheet loaded by Obsidian
├── tsconfig.json
├── version-bump.mjs
├── versions.json
└── main.js # Generated build output used locally by Obsidian (kept untracked in Git)
Local Workflow
npm install
npm run check
npm run build
After rebuilding, reload the plugin in Obsidian:
obsidian plugin:reload id=zotero-citations
Important Local-Plugin Nuance
This folder is both:
- a source repository layout, and
- the live plugin directory under
.obsidian/plugins/
So main.js must continue to exist locally for Obsidian to load the plugin, even though .gitignore excludes it from the GitHub source repository.
Likewise, data.json is local runtime state and should stay untracked. In contrast, styles.css is a real plugin asset and should stay versioned.
Release Metadata
manifest.jsonstores the plugin version and minimum Obsidian version.versions.jsonmaps each released plugin version to its minimum compatible Obsidian version.npm version <patch|minor|major>can useversion-bump.mjsto keepmanifest.jsonandversions.jsonin sync.
Suggested Release Checklist
- Run
npm run check - Run
npm run build - Update
CHANGELOG.md - Bump the version with
npm version ... - Confirm
manifest.jsonandversions.jsonwere updated - Attach
main.js,manifest.json, andstyles.cssto the GitHub release if distributing release artifacts