Skip to content

Commit

Permalink
add export command for distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
xanderjakeq committed Jun 17, 2024
1 parent 49c64a5 commit b65b3aa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ bin/*
cmd/server/tmp
*_templ.go
tmp
static
pdf_output
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,21 @@ MAKEFLAGS += -j2
tailwind:
npx tailwindcss -i ./cmd/server/static/input.css -o ./cmd/server/static/styles.css -c ./cmd/server/tailwind.config.js -m --watch

air:
air: clean_bin
ln -s ./cmd/server/static/ ./bin/static
cd ./cmd/server/ && air

export_server: build_server clean_export
mkdir output
mkdir ./output/bin
mkdir ./output/templates
cp ./bin/server ./output/bin/server
cp -r ./cmd/server/static/ ./output/static
cp -r ./templates/ ./output/templates/

clean_export:
rm -rf ./output/

server: build_server
./bin/server

Expand All @@ -23,5 +34,5 @@ copy_files:
cp -r ./cmd/server/static/ ./bin/static/

clean_bin:
cd ./bin/ && rm -rf *
rm -rf ./bin/*

0 comments on commit b65b3aa

Please sign in to comment.