forked from mlippert/rhythm-rtc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (56 loc) · 2.44 KB
/
Makefile
File metadata and controls
73 lines (56 loc) · 2.44 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#
# Makefile to build and test the riff-rtc client files and server
# duplicates (and should be kept in sync with) some of the scripts in package.json
#
GIT_TAG_VERSION = $(shell git describe)
WEBPACK = ./node_modules/.bin/webpack
COFFEE = ./node_modules/.bin/coffee
LINT = ./node_modules/.bin/eslint
JEST = ./node_modules/.bin/jest
MOCHA = ./node_modules/.bin/mocha
LINT_LOG = logs/lint.log
TEST_LOG = logs/test.log
# Add --quiet to only report on errors, not warnings
LINT_OPTIONS =
LINT_FORMAT = stylish
# Pattern rules
# compile the .js file from the .coffee file
%.js : %.coffee
$(COFFEE) --compile $<
.DELETE_ON_ERROR :
.PHONY : help all build doc lint test clean clean-build
help :
@echo "" ; \
echo "Useful targets in this riff-rtc Makefile:" ; \
echo "- build : build (webpack) the production client" ; \
echo "- build-dev : build (webpack) the development client" ; \
echo "- clean : remove all files created by build" ; \
echo "- init : run install, build-dev; intended for initializing a fresh repo clone" ; \
echo "- install : run npm install" ; \
echo "------ the following are placeholder targets not yet implemented: -----" ; \
echo "- all : run lint, build, test" ; \
echo "- lint : run lint over the sources & tests; display results to stdout" ; \
echo "- lint-log : run lint concise diffable output to $(LINT_LOG)" ; \
echo "- test : run the mocha (unit) tests" ; \
echo "- vim-lint : run lint in format consumable by vim quickfix" ; \
echo ""
all : lint build test
init : install build-dev
install :
npm install
build : src/libs/mm.js
$(WEBPACK) --mode production --config webpack/webpack.config.js
build-dev : src/libs/mm.js
$(WEBPACK) --mode development --config webpack/webpack.config.dev.js
doc :
@echo doc would run the compiler: $(COMPILER)
lint-log: LINT_OPTIONS = --output-file $(LINT_LOG)
lint-log: LINT_FORMAT = unix
vim-lint: LINT_FORMAT = unix
lint vim-lint lint-log:
$(LINT) $(LINT_OPTIONS) --format $(LINT_FORMAT) server
test :
@echo test would run $(MOCHA) --reporter spec test | tee $(TEST_LOG)
clean : clean-build
clean-build :
-rm -fr build/* src/libs/mm.js