forked from keybase/node-saltpack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (34 loc) · 1.19 KB
/
Makefile
File metadata and controls
50 lines (34 loc) · 1.19 KB
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
48
49
50
default: build
all: build
ICED=node_modules/.bin/iced
BUILD_STAMP=build-stamp
TEST_STAMP=test-stamp
WD=`pwd`
BROWSERIFY=node_modules/.bin/browserify
lib/%.js: src/%.iced
$(ICED) -I browserify -c -o `dirname $@` $<
$(BUILD_STAMP): lib/main.js lib/util.js lib/format.js lib/nonce.js lib/header.js lib/payload.js lib/stream.js
date > $@
clean:
find lib -type f -name *.js -exec rm {} \;
rm -rf $(BUILD_STAMP) $(TEST_STAMP) test/browser/test.js
setup:
npm install -d
coverage: $(BUILD_STAMP)
./node_modules/.bin/istanbul cover $(ICED) test/run.iced
test: test-server test-browser
build: $(BUILD_STAMP)
browser: $(BROWSER)
$(BROWSER): lib/main.js $(BUILD_STAMP)
$(BROWSERIFY) -s libweb $< > $@
test-server: $(BUILD_STAMP)
$(ICED) test/run.iced
test-browser: $(TEST_STAMP) $(BUILD_STAMP)
@echo "Please visit in your favorite browser --> file://$(WD)/test/browser/index.html"
$(TEST_STAMP): test/browser/test.js
date > $@
test/browser/test.js: test/browser/main.iced $(BUILD_STAMP)
$(BROWSERIFY) -t icsify $< > $@
browser-demo: $(TEST_STAMP) $(BUILD_STAMP)
node_modules/.bin/browserify -t icsify test/browser/demo.iced > test/browser/demo.js
.PHONY: clean setup test test-browser coverage browser-demo