forked from conveyal/modeify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (31 loc) · 1.03 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
CSS = $(shell find client -name '*.css')
HTML = $(shell find client -name '*.html')
CLIENTJS = $(shell find client -name '*.js')
LIBJS = $(shell find lib -name '*.js')
TESTJS = $(shell find test -name '*.js')
JSON = $(shell find client -name '*.json')
build: components $(CSS) $(HTML) $(CLIENTJS) $(JSON)
@./bin/build-client $(NODE_ENV)
beautify:
@./node_modules/.bin/js-beautify \
--config config/jsbeautify.json \
--replace $(CLIENTJS) $(LIBJS) $(TESTJS) \
--quiet
components: node_modules component.json $(JSON)
@./node_modules/.bin/component install --dev --verbose
# Lint JavaScript with JSHint
lint:
@./node_modules/.bin/jshint \
--config config/jshint.json $(CLIENTJS) $(LIBJS) $(TESTJS)
# Reinstall if package.json has changed
node_modules: package.json
@npm install
# Watch & reload server
serve: server.pid
server.pid: stop
@nohup bin/server > server.log </dev/null & echo "$$!" > server.pid
@echo "Logs stored in server.log"
stop:
@kill `cat server.pid` || true
@rm -f server.pid
.PHONY: beautify lint serve stop