Development Environment¶
Prerequisites¶
- Node.js >= 24.0.0
- npm >= 10.0.0
- prek (optional but recommended — see Pre-commit Hooks below)
Setup¶
Clone the repository:
Install dependencies:
Pre-commit Hooks (prek)¶
prek is a git hook framework (written in Rust) that automatically runs checks before each commit, catching issues before they reach CI. The hook configuration lives in prek.toml.
The configured hooks run on every commit:
- trailing-whitespace — removes trailing whitespace
- end-of-file-fixer — ensures files end with a newline
- check-added-large-files — prevents accidentally committing large files
- check-merge-conflict — detects leftover merge conflict markers
- check-npm-install — verifies
node_modulesis up to date withpackage-lock.json - eslint — runs
npm run lint - prettier — runs
npm run format
To set up prek, install it first:
Then install the git hooks into your local repo:
From this point on, every git commit will automatically run the configured checks. If any check fails, the commit is aborted so you can fix the issue first.
Commands¶
Dev Mode¶
Start the esbuild watcher for live development:
Build¶
Run a full production build (includes TypeScript type checking):
Lint & Format¶
npm run lint # ESLint check
npm run lint:fix # ESLint auto-fix
npm run format # Prettier check
npm run format:fix # Prettier auto-fix
Test¶
Local Installation in Obsidian¶
To test the plugin locally, copy the built output into your vault:
# Build first
npm run build
# Then copy main.js, manifest.json, and styles.css into:
# <your-vault>/.obsidian/plugins/tasks-map/
Enable the plugin in Obsidian under Settings → Community plugins.
API Reference¶
See Obsidian API Docs.