Makefile Snippets
YARN Based Project
Install Dependencies
.PHONY: install
install:
yarn install --immutable --immutable-cache
Update Dependencies
.PHONY: update
update:
yarn up
Build a Release
DISTNAME := scylla-webui
VERSION := $(shell jq -r .version package.json)
DISTDIR := dist
.PHONY: build
build:
yarn build
.PHONY: dist
dist: build
tar --directory="$(DISTDIR)" --create --xz --file="$(DISTNAME)-$(VERSION).tar.xz" .
Run Local Instance
DEVHOST := 127.27.0.1
DEVPORT := 5173
.PHONY:local/up
local/up:
yarn dev --host="$(DEVHOST)" --port="$(DEVPORT)"
Cleanup Workspace
DISTNAME := scylla-webui
VERSION := $(shell jq -r .version package.json)
.PHONY: clean
clean:
-rm --recursive dist/
-rm "$(DISTNAME)-$(VERSION).tar.xz"
.PHONY: distclean
distclean: clean
git clean --force -Xd