···11+22+SHELL = /bin/bash
33+.SHELLFLAGS = -o pipefail -c
44+55+.PHONY: help
66+help: ## Print info about all commands
77+ @echo "Helper Commands:"
88+ @echo
99+ @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[01;32m%-20s\033[0m %s\n", $$1, $$2}'
1010+ @echo
1111+ @echo "NOTE: dependencies between commands are not automatic. Eg, you must run 'deps' and 'build' first, and after any changes"
1212+1313+.PHONY: build
1414+build: ## Compile all modules
1515+ yarn build
1616+1717+.PHONY: test
1818+test: ## Run all tests
1919+ yarn test
2020+2121+.PHONY: fmt
2222+fmt: ## Run syntax re-formatting
2323+ yarn prettier
2424+2525+.PHONY: lint
2626+lint: ## Run style checks and verify syntax
2727+ yarn verify
2828+2929+.PHONY: nvm-setup
3030+nvm-setup: ## Use NVM to install and activate node+yarn
3131+ nvm install 18
3232+ nvm use 18
3333+ npm install --global yarn
3434+3535+.PHONY: deps
3636+deps: ## Installs dependent libs using 'yarn install'
3737+ yarn install --frozen-lockfile
3838+3939+.PHONY: run-dev-plc
4040+run-dev-plc: ## Run PLC server "dev" config (needs local PostgreSQL)
4141+ if [ ! -f "packages/server/.dev.env" ]; then cp packages/server/example.dev.env packages/server/.dev.env; fi
4242+ cd packages/server; ENV=dev yarn run start | yarn exec pino-pretty
+1
packages/server/example.dev.env
···11+# this requires setting up a local postgresql user and database
12DATABASE_URL="postgres://bsky:yksb@localhost/plc_dev"
23DEBUG_MODE=1
34LOG_ENABLED="true"