-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (51 loc) · 1.44 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
63
64
65
66
67
68
include rich.mk
BUILD_PATH = build
SRC_PATH = src
RESOURCE_PATH_BLD = $(BUILD_PATH)/static
.PHONY: all
all: clean scripts styles finalize
.PHONY: styles
styles: prepare_styles compress_styles
.PHONY:
install:
npm install
npm install -g karma-cli
prepare_styles:
@-rm -rf $(RESOURCE_PATH_BLD)/css
mkdir -p $(RESOURCE_PATH_BLD)/css
scripts:
@r.js -o build.js dir=$(BUILD_PATH)
compress_styles:
compass compile -c config.rb --css-dir $(RESOURCE_PATH_BLD)/css -s compressed --force --quiet
finalize:
@-rm -rf $(RESOURCE_PATH_BLD)/scss
@-rm -rf $(BUILD_PATH)/build.txt
clean:
@-rm -rf $(BUILD_PATH)
.PHONY: serve
serve:
cd $(SRC_PATH); simplehttpserver
.PHONY: watch
watch:
compass watch -c config.rb
.PHONY: count-js
count-js:
@echo 'JavaScript Files:'
@find . -name '*.js' -not -path "./src/static/js/vendor/*" | wc -l
@echo 'JavaScript LOC:'
@find . -name '*.js' -not -path "./src/static/js/vendor/*" | xargs cat | wc -l
.PHONY: count-html
count-html:
@echo 'HTML Files:'
@find . -name '*.html' -not -path "./src/static/js/vendor/*" | wc -l
@echo 'HTML LOC:'
@find . -name '*.html' -not -path "./src/static/js/vendor/*" | xargs cat | wc -l
doc: html-clean rst-doc html-doc
html-clean:
rm -rf ./docs/html
rst-doc:
node_modules/.bin/jsdoc -t ./node_modules/jsdoc-rst-template/template --recurse ./src/static/js/app/ -d docs/rst
html-doc:
sphinx-build -b html -c ./ ./docs/rst ./docs/html
serve-doc:
cd docs/html && python -m SimpleHTTPServer