feat(*): svelte 5 panel view sharing the gateway ui, obsidian theme, preview and tests
This commit is contained in:
@@ -1,16 +1,25 @@
|
||||
PLUGIN_ID := beaver
|
||||
ASSETS := manifest.json main.js styles.css versions.json
|
||||
# package-lock.json → npm; otherwise whichever of pnpm/npm is around.
|
||||
PM := $(if $(wildcard package-lock.json),$(shell command -v npm 2>/dev/null),$(shell command -v pnpm 2>/dev/null || command -v npm 2>/dev/null))
|
||||
|
||||
.PHONY: install zip _build
|
||||
.PHONY: sync check fix test build install zip preview
|
||||
|
||||
_build:
|
||||
@test -n "$(PM)" || (echo "no pnpm or npm in PATH" >&2; exit 1)
|
||||
$(PM) install --silent
|
||||
$(PM) run build
|
||||
sync:
|
||||
bun install
|
||||
|
||||
install: _build
|
||||
check:
|
||||
bun lint
|
||||
bun run check
|
||||
|
||||
fix:
|
||||
bun fix
|
||||
|
||||
test:
|
||||
bun run test
|
||||
|
||||
build:
|
||||
bun run build
|
||||
|
||||
install: build
|
||||
@test -n "$(VAULT)" || (echo "set VAULT=<path-to-vault>" >&2; exit 1)
|
||||
@test -d "$(VAULT)/.obsidian" || (echo "no .obsidian dir at $(VAULT)" >&2; exit 1)
|
||||
@target="$(VAULT)/.obsidian/plugins/$(PLUGIN_ID)"; \
|
||||
@@ -18,9 +27,12 @@ install: _build
|
||||
cp $(ASSETS) "$$target/"; \
|
||||
echo "installed → $$target"
|
||||
|
||||
zip: _build
|
||||
zip: build
|
||||
@version=$$(node -p "require('./manifest.json').version"); \
|
||||
out="beaver-plugin-$$version.zip"; \
|
||||
rm -f "$$out"; \
|
||||
zip -q -j "$$out" $(ASSETS); \
|
||||
echo "wrote $$out"
|
||||
|
||||
preview:
|
||||
bun run preview
|
||||
|
||||
Reference in New Issue
Block a user