pcmt/justfile

57 lines
1.2 KiB
Makefile
Raw Normal View History

# run tailwindcss tool in watch mode.
watch-tw:
npm i
npx tailwindcss -i ./assets/input/css/tailwind.css -o ./assets/public/css/pcmt.css --watch
# start browser-sync.
watch-brs:
npm i
npx browser-sync start --config bs.js
# build app stylesheets using the tailwindcss cli tool.
tw:
npm i
npx tailwindcss -i ./assets/input/css/tailwind.css -o ./assets/public/css/pcmt.css --minify
# build the application.
build:
go mod tidy
go build -v -ldflags="-X main.version=$(git rev-parse --short HEAD)" .
# run the application.
run:
./pcmt -devel
# build and run the application
dev: build run
2023-05-03 23:58:40 +02:00
# prepare the app for production.
prod: tw build
# generate code based on ent schemas.
gen:
go generate -v ./ent
# start pg.
dbstart:
podman run \
--name pg \
--userns=keep-id \
--rm \
-it \
-e POSTGRES_PASSWORD=postgres \
2023-05-20 18:00:02 +02:00
-e POSTGRES_INITDB_ARGS="--auth-host=scram-sha-256 --auth-local=scram-sha-256"
-v $PWD/tmp/db:/var/lib/postgresql/data \
-p 127.0.0.1:5432:5432 \
docker.io/library/postgres:15.2-alpine3.17
# stop pg.
dbstop:
podman stop pg
2023-05-08 23:42:27 +02:00
# process svg template assets.
svgo:
svgo -i templates/svg-*.tmpl
2023-05-08 23:42:27 +02:00
# vim: set ts=2 ft=just syntax=make fenc=utf-8 ff=unix :