forked from timostamm/protobuf-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (23 loc) · 821 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
.PHONY: default build clean test
SPECS := $(shell find spec -name '*.spec.ts')
default: clean build test
build:
@./node_modules/.bin/tsc --project tsconfig.json --module es2015 --outDir build/es2015;
@echo "es6 done"
@./node_modules/.bin/tsc --project tsconfig.json --module commonjs --outDir build/commonjs \
--declaration --declarationDir build/types;
@echo "cjs done"
clean:
@find build \( -name '*.js' -or -name '*.map' -or -name '*.ts' \) -delete;
@find build -type d ! -path build -delete
@echo "'${@}' done"
test: test-node test-browser
test-node: $(SPECS)
@echo "'${@}' ..."
@./node_modules/.bin/ts-node \
--project tsconfig.test.json \
./node_modules/.bin/jasmine --helper="spec/support/reporter.ts" \
$^
test-browser:
@echo "'${@}' ..."
@./node_modules/.bin/karma start karma.conf.js