A JavaScript development environment for Emacs https://indium.readthedocs.io
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.4KB

  1. SRCS = indium*.el
  2. LOAD_PATH = -L .
  3. EMACSBIN ?= emacs
  4. BATCH = $(EMACSBIN) -Q --batch $(LOAD_PATH) \
  5. --eval "(require 'package)" \
  6. --eval "(add-to-list 'package-archives '(\"melpa-stable\" . \"http://stable.melpa.org/packages/\"))" \
  7. --funcall package-initialize
  8. .PHONY: all clean dependencies check test test-elisp test-javascript lint lint-elisp lint-javascript
  9. all: check
  10. dependencies: dependencies-elisp dependencies-javascript
  11. dependencies-elisp:
  12. # Install dependencies in ~/.emacs.d/elpa
  13. $(BATCH) \
  14. --eval "(progn (setq package-check-signature nil) (package-refresh-contents))" \
  15. --eval "(package-install 'assess)" \
  16. --eval "(package-install 'company)" \
  17. --eval "(package-install 'undercover)" \
  18. --eval "(package-install 'buttercup)" \
  19. --eval "(package-install 'js2-mode)" \
  20. --eval "(package-install 'js2-refactor)" \
  21. --eval "(package-install 'json-process-client)" \
  22. --eval "(package-install 'exec-path-from-shell)"
  23. dependencies-javascript:
  24. cd server && npm install
  25. check: test lint
  26. test: test-elisp test-javascript
  27. test-elisp:
  28. TRAVIS=true $(BATCH) \
  29. -l buttercup \
  30. -l test/test-helper.el \
  31. -f buttercup-run-discover
  32. test-javascript:
  33. cd server && ./node_modules/.bin/jasmine .
  34. lint: lint-elisp lint-javascript
  35. lint-elisp:
  36. # Byte compile all and stop on any warning or error
  37. $(BATCH) \
  38. --eval "(setq byte-compile-error-on-warn t)" \
  39. -f batch-byte-compile ${SRCS}
  40. lint-javascript:
  41. cd server && ./node_modules/.bin/eslint .