-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (18 loc) · 1004 Bytes
/
Copy pathMakefile
File metadata and controls
26 lines (18 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
GOOS=linux
GOARCH=amd64
all: ilno
VERSION := 0.1.0
BUILD_DATE := `date +%FT%T%z`
LD_FLAGS := "-X 'wrong.wang/x/go-isso/version.Version=$(VERSION)' -X 'wrong.wang/x/go-isso/version.BuildTime=$(BUILD_DATE)'"
ilno: $(shell ag -l --go) server/bindata.go
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -ldflags $(LD_FLAGS) -o ilno
server/bindata.go: static/js/embed.min.js
go-bindata -fs -o server/bindata.go -pkg server -prefix "static/" static/js/...
static/js/%.min.js: js/%.js $(shell find ./js) js/app/text/postbox.js js/app/text/comment_loader.js js/app/text/comment.js
./node_modules/esbuild/bin/esbuild --bundle --minify --sourcemap --outfile=$@ $<
static/js/%.js: js/%.js $(shell find ./js) js/app/text/postbox.js js/app/text/comment_loader.js js/app/text/comment.js
./node_modules/esbuild/bin/esbuild --bundle --sourcemap --outfile=$@ $<
js/app/text/%.js: js/app/text/%.jade
./node_modules/.bin/pug --client --no-debug --name tt_$* --silent $<
echo '' >> $@
echo 'export default tt_$*' >> $@