Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 1.59 KB

contributing.md

File metadata and controls

34 lines (22 loc) · 1.59 KB

Development

Feel free to fork and open a PR if something is missing or broken ❤️

Local development

  1. Move this to your .obsidian/plugins directory in a vault you don't mind messing with.
  2. npm i
  3. npm run dev
  4. Add hot-reload to the same .obsidian/plugins directory and enable it in Obsidian to ease development.

Linting

Make sure to run npm run lint and fixing any changes that can't be fixed with npm run lint:fix before pushing your changes.

Tips and Tricks

  1. Cmd+alt+i (in Mac) opens the Obsidian dev tools so you can debug with console.log
  2. If you need to pause and inspect the popup and the pause hotkey isn't working for you, you can enter setTimeout(() => { debugger; }, 5000) in the dev-tools console to give yourself 5 seconds to open to popup before the inspector pauses execution so you can inspect the popup without it closing.
  3. Use this.app.emulateMobile(true); to emulate mobile on desktop. This isn't perfect and you'll still need to test on mobile, but it's a good turnkey for some things.

Releasing

Once changes are in main, add a tag reflecting the new semver (without the v prefix) and push the tag to the repo.

For example:

git tag 1.0.0
git push origin 1.0.0

Release.yml will handle bumping the version and publishing a release to the Releases Page.

Remember to update the newest release notes with any relevant changes.