-
-
Notifications
You must be signed in to change notification settings - Fork 61
/
Makefile
55 lines (41 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
SRCS = indium*.el
LOAD_PATH = -L .
EMACSBIN ?= emacs
BATCH = $(EMACSBIN) -Q --batch $(LOAD_PATH) \
--eval "(require 'package)" \
--eval "(add-to-list 'package-archives '(\"melpa-stable\" . \"http://stable.melpa.org/packages/\"))" \
--funcall package-initialize
.PHONY: all clean dependencies check test test-elisp test-javascript lint lint-elisp lint-javascript
all: check
dependencies: dependencies-elisp dependencies-javascript
dependencies-elisp:
# Install dependencies in ~/.emacs.d/elpa
$(BATCH) \
--eval "(progn (setq package-check-signature nil) (package-refresh-contents))" \
--eval "(package-install 'assess)" \
--eval "(package-install 'company)" \
--eval "(package-install 'undercover)" \
--eval "(package-install 'buttercup)" \
--eval "(package-install 'js2-mode)" \
--eval "(package-install 'js2-refactor)" \
--eval "(package-install 'json-process-client)" \
--eval "(package-install 'exec-path-from-shell)"
dependencies-javascript:
cd server && npm install
check: test lint
test: test-elisp test-javascript
test-elisp:
TRAVIS=true $(BATCH) \
-l buttercup \
-l test/test-helper.el \
-f buttercup-run-discover
test-javascript:
cd server && ./node_modules/.bin/jasmine .
lint: lint-elisp lint-javascript
lint-elisp:
# Byte compile all and stop on any warning or error
$(BATCH) \
--eval "(setq byte-compile-error-on-warn t)" \
-f batch-byte-compile ${SRCS}
lint-javascript:
cd server && ./node_modules/.bin/eslint .