forked from steemit/steemit-render
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (28 loc) · 847 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
37
38
39
SHELL := /bin/bash
PATH := ./node_modules/.bin:$(PATH)
SRC_FILES := $(shell find src -name '*.ts')
all: lib
lib: $(SRC_FILES) node_modules tsconfig.json package.json
tsc -p tsconfig.json --outDir lib
touch lib
.PHONY: coverage
coverage: node_modules
nyc -r html -r text -e .ts -i ts-node/register mocha --reporter nyan --require ts-node/register test/*.ts
.PHONY: test
test: node_modules
mocha --require ts-node/register test/*.ts --grep '$(grep)'
.PHONY: ci-test
ci-test: node_modules
tslint -p tsconfig.json -c tslint.json
nyc -r lcov -e .ts -i ts-node/register mocha --reporter tap --require ts-node/register test/*.ts
.PHONY: lint
lint: node_modules
tslint -p tsconfig.json -c tslint.json -t stylish --fix
node_modules:
npm install
.PHONY: clean
clean:
rm -rf lib/
.PHONY: distclean
distclean: clean
rm -rf node_modules/