forked from MaxEmanuel/xquery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (27 loc) · 1.07 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
JS_FILES=server.js $(patsubst src/%.coffee,public/%.js,$(wildcard src/*.coffee src/**/*.coffee src/*/*/*.coffee))
JADE_FILES=public/index.html
all: $(JS_FILES) $(HANDLEBARS_FILES) $(JADE_FILES)
public/%.html: views/%.jade $(wildcard views/*.jade views/*/*.jade)
@mkdir -p $(dir $@)
./node_modules/jade/bin/jade.js -o $(dir $@) $<
public/%.js: src/%.coffee
@mkdir -p $(dir $@)
./node_modules/coffee-script/bin/coffee --output $(dir $@) --compile --map $<
%.js: %.coffee
@mkdir -p $(dir $@)
./node_modules/coffee-script/bin/coffee --map --compile $<
public/%.handlebars: views/%.handlebars
@mkdir -p $(dir $@)
cp $< $@
install:
npm install
./node_modules/bower/bin/bower --allow-root install
cd bower_components/bootstrap && npm install && make && make bootstrap
run: all
@kill `cat server.pid`; true
@node server & echo $$! > server.pid
stats:
cloc --exclude-dir=public,old,data,node_modules --force-lang=html,jade .
nodemon:
./node_modules/nodemon/nodemon.js --watch . --ext js,jade,coffee,handlebars --exec 'make run' .
.PHONY: clean install all run nodemon stats