2018-05-15 04:39:03 -04:00
|
|
|
TS_FILES = \
|
2018-05-27 12:49:20 -04:00
|
|
|
deno.d.ts \
|
2018-05-21 22:07:40 -04:00
|
|
|
dispatch.ts \
|
2018-05-27 03:46:18 -04:00
|
|
|
fetch.ts \
|
2018-05-23 16:45:01 -04:00
|
|
|
globals.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-27 14:15:22 -04:00
|
|
|
text-encoding.d.ts \
|
2018-05-18 11:49:28 -04:00
|
|
|
timers.ts \
|
2018-05-23 16:45:01 -04:00
|
|
|
tsconfig.json \
|
|
|
|
types.ts \
|
2018-05-18 20:39:20 -04:00
|
|
|
url.js \
|
2018-05-21 09:54:37 -04:00
|
|
|
util.ts \
|
2018-05-23 16:45:01 -04:00
|
|
|
v8_source_maps.ts \
|
|
|
|
v8worker2.d.ts
|
2018-05-15 04:39:03 -04:00
|
|
|
|
2018-05-21 22:07:40 -04:00
|
|
|
GO_FILES = \
|
2018-05-29 04:28:32 -04:00
|
|
|
cmd/main.go \
|
2018-05-21 22:07:40 -04:00
|
|
|
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 \
|
2018-05-27 03:46:18 -04:00
|
|
|
echo.go \
|
|
|
|
fetch.go \
|
2018-05-21 22:07:40 -04:00
|
|
|
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-30 08:33:55 -04:00
|
|
|
util.go \
|
|
|
|
util_test.go \
|
|
|
|
integration_test.go
|
2018-05-21 22:07:40 -04:00
|
|
|
|
2018-05-29 04:28:32 -04:00
|
|
|
|
2018-05-23 16:45:01 -04:00
|
|
|
deno: msg.pb.go $(GO_FILES)
|
2018-05-29 04:28:32 -04:00
|
|
|
go build -o deno ./cmd
|
2018-05-14 01:11:56 -04:00
|
|
|
|
|
|
|
assets.go: dist/main.js
|
2018-05-30 12:47:26 -04:00
|
|
|
cp node_modules/typescript/lib/*d.ts dist/
|
2018-05-23 16:45:01 -04:00
|
|
|
cp deno.d.ts dist/
|
2018-05-29 04:28:32 -04:00
|
|
|
go-bindata -pkg deno -o assets.go dist/
|
2018-05-14 01:11:56 -04:00
|
|
|
|
|
|
|
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-30 20:03:10 -04:00
|
|
|
./node_modules/.bin/parcel build --out-dir=dist/ --log-level=1 --no-minify main.ts
|
2018-05-14 01:11:56 -04:00
|
|
|
|
|
|
|
node_modules:
|
|
|
|
yarn
|
|
|
|
|
|
|
|
clean:
|
2018-05-23 13:37:04 -04:00
|
|
|
-rm -f deno assets.go msg.pb.go msg.pb.js msg.pb.d.ts
|
2018-05-14 01:11:56 -04:00
|
|
|
-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
|
2018-05-23 13:37:04 -04:00
|
|
|
yarn fmt
|
2018-05-14 03:15:21 -04:00
|
|
|
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-24 10:12:35 -04:00
|
|
|
go test -v
|
2018-05-15 06:50:32 -04:00
|
|
|
|
2018-05-17 21:02:06 -04:00
|
|
|
.PHONY: test lint clean distclean
|