forked from fernandezpablo85/react-typescript-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (26 loc) · 751 Bytes
/
Makefile
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
27
28
29
30
31
32
33
34
35
36
PACKAGES = $(shell go list ./... | grep -v vendor)
VIEWS = $(wildcard views/*.html)
build: install assets
@go fmt ${PACKAGES}
@go build ${PACKAGES}
@go vet ${PACKAGES}
bindata.go: $(VIEWS)
@go generate ${PACKAGES}
@touch $@
assets: bindata.go
glide.lock: glide.yaml
@glide update
@glide install
@touch $@
install: glide.lock
test: build
@go test ${PACKAGES}
clean-ts:
@rm -rf public/js/compiled
ts_files = $(shell find public/typescript -name '*.tsx')
ts-compile: $(ts_files)
@tsc --noImplicitAny --jsx react --rootDir public/typescript --outDir public/js/compiled $?
ts-compile-watch: $(ts_files)
@tsc -w --noImplicitAny --jsx react --rootDir public/typescript --outDir public/js/compiled $?
run: ts-compile assets
@go run *.go