-
Notifications
You must be signed in to change notification settings - Fork 33
/
Makefile
46 lines (31 loc) · 813 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
40
41
42
43
44
45
46
default: all
SRC = $(shell find src -name "*.ls" -type f | sort)
LIB = $(SRC:src/%.ls=lib/%.js)
LS = node_modules/livescript
LSC = node_modules/.bin/lsc
MOCHA = node_modules/.bin/mocha
MOCHA2 = node_modules/.bin/_mocha
ISTANBUL = node_modules/.bin/istanbul
package.json: package.json.ls
$(LSC) --compile package.json.ls
lib:
mkdir -p lib/
lib/%.js: src/%.ls lib
$(LSC) --compile --output lib "$<"
.PHONY: build test coverage install-dev install loc clean
all: build
build: $(LIB) package.json
test: build
$(MOCHA) --reporter dot --ui tdd --compilers ls:$(LS)
coverage: build
$(ISTANBUL) cover $(MOCHA2) -- --reporter dot --ui tdd --compilers ls:$(LS)
dev-install: package.json
npm install .
install:
npm install -g .
loc:
wc -l src/*
clean:
rm -f package.json
rm -rf lib
rm -rf coverage