generated from chrisgrieser/pseudometa-obsidian-plugin-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
32 lines (25 loc) · 948 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.PHONY: build format check-all check-tsc release init
# if on macOS, open dev-vault & create symlink to if needed
build:
dev_vault="$$HOME/Library/Mobile Documents/iCloud~md~obsidian/Documents/Development" ; \
node .esbuild.config.mjs && \
if [[ "$$OSTYPE" =~ darwin* ]] ; then \
plugin_path="$$dev_vault/.obsidian/plugins/quadro" ; \
[[ -e "$$plugin_path" ]] || ln -s "$$PWD" "$$plugin_path" ; \
vault_name=$$(basename "$$dev_vault") ; \
open "obsidian://open?vault=$$vault_name" ; \
fi
format:
npx biome format --write "$$(git rev-parse --show-toplevel)"
npx markdownlint-cli --fix --ignore="node_modules" "$$(git rev-parse --show-toplevel)"
check-all:
zsh ./.githooks/pre-commit
check-tsc:
npx tsc --noEmit --skipLibCheck --strict && echo "Typescript OK"
release:
node .release.mjs
# install dependencies, build, enable git hooks
init:
npm install && \
node .esbuild.config.mjs ; \
git config core.hooksPath .githooks