-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile
47 lines (32 loc) · 875 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
47
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
BROWSERIFY = node_modules/.bin/browserify
MOCHA = node_modules/.bin/mocha
package.json: package.json.ls
$(LSC) --compile package.json.ls
lib:
mkdir -p lib/
lib/%.js: src/%.ls lib
$(LSC) --compile --output lib "$<"
browser:
mkdir -p browser/
browser/type-check.js: $(LIB) browser
{ ./preroll ; $(BROWSERIFY) -r ./lib/index.js:type-check ; } > browser/type-check.js
.PHONY: build build-browser test coverage dev-install loc clean
all: build
build: $(LIB) package.json
build-browser: browser/type-check.js
test: build
$(MOCHA) --ui tdd --require livescript "test/**/*.ls"
dev-install: package.json
npm install .
loc:
wc -l $(SRC)
clean:
rm -f package.json
rm -rf lib
rm -rf browser
rm -rf coverage