mirror of
https://github.com/lossless-group/image-gin.git
synced 2026-07-22 06:49:33 +00:00
No description
yet On branch refactor/refactor-to-starter-code Changes to be committed: modified: README.md modified: package.json modified: setup-plugin.mjs |
||
|---|---|---|
| src | ||
| .editorconfig | ||
| .eslintignore | ||
| .eslintrc | ||
| .gitattributes | ||
| .gitignore | ||
| .npmrc | ||
| .windsurfrules.md | ||
| esbuild.config.mjs | ||
| main.ts | ||
| manifest.json | ||
| package.json | ||
| plugin-config.yaml | ||
| pnpm-lock.yaml | ||
| README.md | ||
| setup-plugin.mjs | ||
| styles.css | ||
| tsconfig.json | ||
| version-bump.mjs | ||
| versions.json | ||
Obsidian Plugin Starter
This is barebones starter code to build an Obsidian plugin using the pnpm package manager. It is a clone of the official Obsidian plugin starter code, but with updated libraries, packages, dependencies.
Getting Started
If you want to use the setup-plugin.mjs script, fill out plugin-config.yaml and then make it an executable file.
chmod +x setup-plugin.mjs
When run, it will create the basic metadata and fill in the template variables. If you don't need it, just delete it and happy hacking.
Run the script with
node setup-plugin.mjs
pnpm install
pnpm add -D esbuild @types/node builtin-modules
pnpm build
pnpm dev
Packages, Dependencies, Libraries:
"devDependencies": {
"@types/node": "^24.0.12",
"@typescript-eslint/eslint-plugin": "8.36.0",
"@typescript-eslint/parser": "8.36.0",
"builtin-modules": "5.0.0",
"esbuild": "0.25.6",
"eslint": "^9.30.1",
"obsidian": "latest",
"tslib": "2.8.1",
"typescript": "5.8.3"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.15.0",
"fastify": "^5.4.0",
"zod": "^4.0.0"
}
Using Symbolic Links to Test Your Plugin
If you're like us, you have a directory housing all your code projects. To use your plugin as you develop it, just create a symbolic link. Here is my example, but you will need to use your own path structure:
ln -s /Users/mpstaton/code/lossless-monorepo/obsidian-plugin-starter /Users/mpstaton/content-md/lossless/.obsidian/plugins/