-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
42 lines (34 loc) · 807 Bytes
/
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
.PHONY: all clean test heroku
SRCDIR = src
SRC = $(shell find src -name "*.coffee")
OUTDIR = bin
OUT = $(SRC:src/%.coffee=bin/%.js)
TESTDIR = test
TESTGREP = ""
COFFEE = ./node_modules/.bin/coffee
CFLAGS = -c -o $(OUTDIR)
MOCHA = ./node_modules/.bin/mocha \
-R spec \
--compilers coffee:coffee-script \
--ignore-leaks \
--timeout 5s
all: $(OUT)
$(OUT): $(SRC)
@mkdir -p $(OUTDIR)
$(COFFEE) $(CFLAGS) $(SRCDIR)
test: all
$(MOCHA) $(TESTDIR) --grep $(TESTGREP)
clean:
rm -rf $(OUTDIR)
scrape:
$(COFFEE) scraper/scraper.coffee
heroku: all
cp Procfile heroku
cp package.json heroku
cp README.md heroku
cp -R bin heroku
cp -R data heroku
cd front && ./build
cp -R front/public heroku
cd heroku && npm install --production
cd heroku && git add . && git commit -m "update"