Obsidian Plugin Bootstrap
First, install Yeoman and generator-obsidian-plugin using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-obsidian-plugin
Then generate your new project:
yo obsidian-plugin
- Enables unofficial TypeScript typings to the internal Obsidian API.
- Code style is forced via
ESLint
. - Available commands:
-
npm run build
: builds the production version ofmain.js
ready for publishing the release. -
npm run dev
: builds the development version ofmain.js
.- If the environment variable
OBSIDIAN_CONFIG_DIR
is set to something likepath/to/my/vault/.obsidian
, the command automatically copies the compiled version of the plugin there and triggers the Hot Reload plugin if it is installed.
- If the environment variable
-
npm run lint
: verifies the code style and automatically fixes some of the issues. -
npm run version
: updates the plugin's version in multiple places, based on the value frompackage.json
.
-