This plugin uses a template that automates the development and publication processes on GitHub, including releases. You can develop either inside or outside your Obsidian vault.
- All source files must be in the
src
folder:main.ts
styles.css
Note: If
styles.css
is accidentally placed in the root folder instead ofsrc
, it will be automatically moved to the correct location when running any development command. After building, a copy ofstyles.css
will appear in the root folder as part of the normal release process.
-
Inside the vault's plugins folder:
- Delete the
.env
file - Run npm commands as usual
- Delete the
-
Outside the vault:
- Set the paths in the
.env
file:TestVault
for developmentRealVault
for production simulation
- Necessary files will be automatically copied to the targeted vault
- Set the paths in the
npm run start
: Opens VS Code, runsnpm install
, thennpm run dev
npm run dev
: For developmentnpm run build
: Builds the projectnpm run real
: Simulates a traditional plugin installation in your REAL vaultnpm run bacp
: Builds, adds, commits, and pushes (prompts for commit message)npm run acp
: Adds, commits, and pushes (without building)npm run version
: Updates version, modifies relevant files, then adds, commits, and pushesnpm run release
: Creates a GitHub release (prompts for release title, can be multiline using\n
)
npm run start
npm run bacp
npm run version
npm run release
- obsidian-typings: This template automatically includes obsidian-typings, providing access to additional types not present in the official API.
For SASS support, check out the sass-ready
branch in the original template repository.
When you are using the template for this branch, you need to check use all branchs option. then after you clone your new plugin, there is a batch in the root folder to replace the master branch by sass-ready one. run this once