2018-05-15 04:39:03 -04:00
|
|
|
TS_FILES = \
|
|
|
|
amd.ts \
|
|
|
|
main.ts \
|
|
|
|
msg.pb.js \
|
|
|
|
compiler.ts \
|
|
|
|
msg.pb.d.ts \
|
|
|
|
os.ts \
|
|
|
|
util.ts
|
|
|
|
|
2018-05-14 01:11:56 -04:00
|
|
|
deno: assets.go msg.pb.go main.go
|
|
|
|
go build -o deno
|
|
|
|
|
|
|
|
assets.go: dist/main.js
|
|
|
|
go-bindata -pkg main -o assets.go dist/
|
|
|
|
|
|
|
|
msg.pb.go: msg.proto
|
|
|
|
protoc --go_out=. msg.proto
|
|
|
|
|
|
|
|
msg.pb.js: msg.proto node_modules
|
|
|
|
./node_modules/.bin/pbjs -t static-module -w commonjs -o msg.pb.js msg.proto
|
|
|
|
|
|
|
|
msg.pb.d.ts: msg.pb.js node_modules
|
|
|
|
./node_modules/.bin/pbts -o msg.pb.d.ts msg.pb.js
|
|
|
|
|
2018-05-15 04:39:03 -04:00
|
|
|
dist/main.js: $(TS_FILES) node_modules
|
2018-05-14 01:19:23 -04:00
|
|
|
./node_modules/.bin/tsc --noEmit # Only for type checking.
|
2018-05-14 01:11:56 -04:00
|
|
|
./node_modules/.bin/parcel build --out-dir=dist/ --no-minify main.ts
|
|
|
|
|
|
|
|
node_modules:
|
|
|
|
yarn
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f deno assets.go msg.pb.go msg.pb.js msg.pb.d.ts
|
|
|
|
-rm -rf dist/
|
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
-rm -rf node_modules/
|
|
|
|
|
2018-05-14 03:06:09 -04:00
|
|
|
lint: node_modules
|
|
|
|
yarn lint
|
|
|
|
go vet
|
|
|
|
|
2018-05-14 03:15:21 -04:00
|
|
|
fmt: node_modules
|
|
|
|
yarn fmt
|
|
|
|
go fmt
|
2018-05-14 21:47:39 -04:00
|
|
|
clang-format msg.proto -i
|
2018-05-14 03:15:21 -04:00
|
|
|
|
2018-05-15 06:50:32 -04:00
|
|
|
test:
|
|
|
|
node test.js
|
|
|
|
|
2018-05-14 03:06:09 -04:00
|
|
|
.PHONY: lint clean distclean
|