2018-05-15 04:39:03 -04:00
|
|
|
TS_FILES = \
|
2018-05-21 17:33:33 -04:00
|
|
|
tsconfig.json \
|
2018-05-21 22:07:40 -04:00
|
|
|
dispatch.ts \
|
2018-05-15 04:39:03 -04:00
|
|
|
main.ts \
|
2018-05-17 09:47:09 -04:00
|
|
|
msg.pb.d.ts \
|
2018-05-15 04:39:03 -04:00
|
|
|
msg.pb.js \
|
2018-05-17 09:47:09 -04:00
|
|
|
os.ts \
|
|
|
|
runtime.ts \
|
2018-05-18 11:49:28 -04:00
|
|
|
timers.ts \
|
2018-05-18 20:39:20 -04:00
|
|
|
url.js \
|
2018-05-21 09:54:37 -04:00
|
|
|
util.ts \
|
|
|
|
v8_source_maps.ts
|
2018-05-15 04:39:03 -04:00
|
|
|
|
2018-05-21 22:07:40 -04:00
|
|
|
GO_FILES = \
|
|
|
|
assets.go \
|
|
|
|
deno_dir.go \
|
2018-05-23 11:27:56 -04:00
|
|
|
deno_dir_test.go \
|
2018-05-21 22:07:40 -04:00
|
|
|
dispatch.go \
|
|
|
|
main.go \
|
|
|
|
msg.pb.go \
|
2018-05-21 23:00:36 -04:00
|
|
|
os.go \
|
2018-05-23 11:27:56 -04:00
|
|
|
os_test.go \
|
2018-05-21 23:00:36 -04:00
|
|
|
timers.go \
|
2018-05-21 22:07:40 -04:00
|
|
|
util.go
|
|
|
|
|
|
|
|
deno: $(GO_FILES)
|
2018-05-14 01:11:56 -04:00
|
|
|
go build -o deno
|
|
|
|
|
|
|
|
assets.go: dist/main.js
|
2018-05-17 09:47:09 -04:00
|
|
|
cp node_modules/typescript/lib/lib.d.ts dist/
|
2018-05-14 01:11:56 -04:00
|
|
|
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-17 21:02:06 -04:00
|
|
|
test: deno
|
2018-05-15 06:50:32 -04:00
|
|
|
node test.js
|
2018-05-19 04:47:40 -04:00
|
|
|
go test
|
2018-05-15 06:50:32 -04:00
|
|
|
|
2018-05-17 21:02:06 -04:00
|
|
|
.PHONY: test lint clean distclean
|