-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
80 lines (57 loc) · 1.73 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
69
70
71
72
73
74
75
76
77
78
79
80
REPORTER = spec
stylus_files := $(wildcard assets/styl/*.styl)
javascript_files := $(wildcard assets/*.js)
template_files := $(patsubst assets/jade/%.jade,static/%.html,$(wildcard assets/jade/*.jade))
default: build/build.js
@:
build/build.js: static/index.html $(stylus_files) $(javascript_files)
echo "stuff"
@component build --dev --use component-stylus
local_build: components node_modules static static/css
@./node_modules/.bin/component build --dev --use component-stylus
heroku: local_build templates
@node app.js
components: component.json
@./node_modules/.bin/component install
node_modules: package.json
echo "npm"
@npm install
serve: default
nodemon app.js
static/index.html: $(wildcard assets/jade/*.jade) assets/pages.js
@echo "index"
@./build.js
static/css: assets/styl
stylus assets/styl -o static/css/
watch-styl:
stylus --watch assets/styl -o static/css/
watch-test:
supervisor -n exit -w lib,test -e txt,js -x make -- test -B -s
watch-cov:
supervisor -n exit -w lib,test -e txt,js -x make -- test-cov -B -s
test: lint test-only
lintfiles := *.js *.json assets
lint:
@./node_modules/.bin/jshint --extra-ext .js,.json --verbose $(lintfiles)
test-only:
@echo "No tests yet"
oldtest: lib
@NODE_ENV=test ./node_modules/.bin/mocha \
--reporter $(REPORTER)
@touch test
reboot:
@rm -rf node_modules components
subrepos := $(wildcard components/*/.git)
git-up:
@for dir in $(subrepos); do \
echo $$dir; cd $$dir/.. && git pull; cd -; \
done
git pull
test-cov=coverage.html
coverage.html: lib-cov test
@EXPRESS_COV=1 $(MAKE) --no-print-directory test -B REPORTER=html-cov > coverage.html
@touch coverage.html
lib-cov: lib
@jscoverage --no-highlight lib lib-cov
@touch lib-cov
.PHONY: test-cov git-up test default