This is a template repository for an Obsidian plugin bundled with Vitejs.
Warning
As of right now, this template is inteded for my use only. You are welcome to use it, however I cannot guarantee the quality of it.
There are a few things I want to do prior to advertising this for others to use:
- Add i18next stuff
- Fix up eslint stuff (I don't really use eslint personally)
- Make an NPM create script
- inputs for plugin name variations and author name
- Add choice of SCSS or PostCSS
- Add choice for sample code in plugin class
- Add framework choices
- vanilla typescript
- Solid
- React
- Svelte
- Vue
- Add choice for testing framework (choices or just Vitest?) (I haven't really used unit tests ever)
-
npm run dev
will automatically watch and build your plugin when you save changes. If using the hot-reload plugin (which you should be), you may want to use my PR to ensure rendering-related changes are hot reloaded correctly. -
main.js
andstyles.css
output to the root directory of the repo. Place the repo in/yourvault/.obsidian/plugins/
to be able to test out your plugin. -
Tailwind is scoped to children of an element with the
twcss
class. Make sure your view/codeblock/whatever has this class to enable tw utility classes for its children.
- Replace the following words in all files to your liking:
- obsidian-vite
- Obsidian Vite
- ObsidianVite
- Look over
/manifest.json
and adjust as needed. - Look over
/tsconfig.app.json
,/vite.config.ts
,/src/main.tsx
and comment/uncomment depending on whether you want to use React or Solid. - Change author name in LICENSE to your name
MIT