This Obsidian code template is used to create small plugins. Small is defined as:
- residing in one single file (main.ts)
- needing only a couple of functions to pull it off
- heavily based off of the official sample plugin
- uses esbuild for building and npm for library management
- does NOT use lint
- It is assumed you are experienced enough with coding plugins that you've graduated to the next level from the official Obsidian Sample Plugin
- More documentation may be found on the plugin's wiki pages.
- Make sure you have the basics preconfigured:
- You've installed NodeJS/npm.
- You are using Hot Reload
- You have run
npm updaterecently to ensure your Obsidian API is up to date.
- Make a copy of this repo as a template with the "Use this template" button (login to GitHub if you don't see it).
- Clone your repo to a local development folder. Put the folder in your .obsidian/plugins/your-plugin-name folder.
- run
npm ioryarnto install dependencies - Run the compile wait loop by running from the command line
npm run dev
For more information on making releases and adding it the the community plugin list, see Obisidian's Sample Plugin's Readme
- Be sure to head over to the plugin template's github wiki for tools to make development easier and documentation on this template.