Cartella con file per la frontend, un makefile per costruire tutto e lista utenti con fuzzy search
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
|
||||
JS_SOURCES = $(wildcard frontend/src/*.js)
|
||||
JS_OUTPUTS = $(patsubst frontend/src/%.js, public/js/%.min.js, $(JS_SOURCES))
|
||||
SERVER_EXECUTABLE = phc-website-server
|
||||
|
||||
.PHONY: all
|
||||
all: js go
|
||||
|
||||
#
|
||||
# Build Frontend
|
||||
#
|
||||
|
||||
.PHONY: js
|
||||
js: $(JS_OUTPUTS)
|
||||
@echo "Compiled Frontend"
|
||||
|
||||
public/js/%.min.js: frontend/src/%.js
|
||||
cd frontend; rollup -c rollup.config.js
|
||||
cp $(patsubst frontend/src/%.js, frontend/dist/%.min.js, $<) $@
|
||||
|
||||
#
|
||||
# Build Server
|
||||
#
|
||||
|
||||
.PHONY: go
|
||||
go: $(SERVER_EXECUTABLE)
|
||||
@echo "Compiled Server"
|
||||
|
||||
$(SERVER_EXECUTABLE):
|
||||
go build -o $(SERVER_EXECUTABLE) .
|
||||
|
||||
.PHONY: debug
|
||||
debug:
|
||||
@echo "JS_SOURCES = $(JS_SOURCES)"
|
||||
@echo "JS_OUTPUTS = $(JS_OUTPUTS)"
|
||||
@echo "SERVER_EXECUTABLE = $(SERVER_EXECUTABLE)"
|
||||
Reference in New Issue
Block a user