Skip to main content

Makefile Snippets

YARN Based Project

Build a Release

DISTNAME := scylla-webui
VERSION := $(shell jq -r .version package.json)

.PHONY: build
build:
	yarn build

.PHONY: dist
dist: build
	tar --directory=dist/ --create --xz --file="$(DISTNAME)-$(VERSION).tar.xz" .

Install Dependencies

.PHONY: local/install
local/install:
	yarn install --immutable-cache

Update Dependencies

.PHONY: local/update
local/update:
	yarn up

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