forked from zenlor/node-jst
/
Makefile
62 lines (54 loc) · 1.02 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#
# Test configuration
#
TESTS = \
test/index.js \
test/underscore_templates.js \
test/minstache_templates.js \
test/whiskers_templates.js
REPORTER = list
COMMIT = $(git rev-parse HEAD)
#
# Run tests
#
test:
./node_modules/.bin/mocha \
--require should \
--reporter $(REPORTER) \
--growl \
$(TESTS)
test-watch:
./node_modules/.bin/mocha \
--watch
--require should \
--reporter $(REPORTER) \
--growl \
$(TESTS)
#
# Run benchmark
#
benchmark:
@@ node benchmark/console/index.js
#
# Docs
#
docs: clean-docs index.html test.html
git checkout gh-pages
mv docs/index.html index.html
mv docs/test.html test.html
git commit -am 'updating docs from $(COMMIT)'
git push origin gh-pages
git checkout master
test.html:
make test \
REPORTER=doc \
| cat docs/head.html - docs/tail.html \
> docs/test.html
index.html:
cat Readme.md | \
./node_modules/.bin/marked | \
cat docs/head.html - docs/tail.html \
> docs/index.html
clean-docs:
rm -f docs/index.html docs/test.html
.PHONY: test benchmark clean-docs