2020-09-26 07:22:14 +00:00
|
|
|
TTY_SERVER_ASSETS=$(wildcard frontend/public/*) frontend/public/index.html
|
|
|
|
|
|
|
|
.PHONY: all frontend clean cleanfront rebuild
|
|
|
|
|
2020-10-03 11:22:25 +00:00
|
|
|
all: assets_bundle.go
|
2020-09-26 07:22:14 +00:00
|
|
|
@echo "Done"
|
|
|
|
|
|
|
|
rebuild: clean all
|
|
|
|
|
|
|
|
assets_bundle.go: $(TTY_SERVER_ASSETS)
|
|
|
|
go get github.com/go-bindata/go-bindata/...
|
2020-09-26 08:41:54 +00:00
|
|
|
go-bindata --prefix frontend/public/ -pkg server -o $@ frontend/public/*
|
2020-09-26 07:22:14 +00:00
|
|
|
|
2020-09-26 08:41:54 +00:00
|
|
|
frontend: cleanfront frontend/public/index.html assets_bundle.go
|
2020-09-26 07:22:14 +00:00
|
|
|
|
|
|
|
frontend/public/index.html:
|
|
|
|
cd frontend && npm install && npm run build && cd -
|
|
|
|
|
|
|
|
cleanfront:
|
|
|
|
rm -fr frontend/public
|
|
|
|
|
|
|
|
clean: cleanfront
|
2020-10-03 11:22:25 +00:00
|
|
|
rm -fr assets_bundle.go
|
2020-09-26 07:22:14 +00:00
|
|
|
@echo "Cleaned"
|