Now working with yarn. 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, except yarn install. Or rather use yarn to run them.
- 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
yarn run start
: Opens VS Code, runsyarn install
, thenyarn run dev
yarn run dev
: For developmentyarn run build
: Builds the projectyarn run real
: Simulates a traditional plugin installation in your REAL vaultyarn run bacp
: Builds, adds, commits, and pushes (prompts for commit message)yarn run acp
: Adds, commits, and pushes (without building)yarn run version
: Updates version, modifies relevant files, then adds, commits, and pushesyarn run release
: Creates a GitHub release (prompts for release title, can be multiline using\n
)
yarn run start
yarn run bacp
yarn run version
yarn 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