forked from sverweij/dependency-cruiser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (38 loc) · 1.27 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
.SUFFIXES: .js .css .html
NODE=node
RM=rm -f
GENERATED_SOURCES=src/cli/initConfig/config.json.template.js \
src/cli/initConfig/config.js.template.js \
src/report/csv/csv.template.js \
src/report/dot/moduleLevel/dot.template.js \
src/report/dot/folderLevel/ddot.template.js \
src/report/html/html.template.js \
src/report/err-html/err-html.template.js
.PHONY: help dev-build clean
help:
@echo
@echo " -------------------------------------------------------- "
@echo "| More information and other targets: open the Makefile |"
@echo " -------------------------------------------------------- "
@echo
@echo "Useful targets:"
@echo
@echo "dev-build. If necessary this ..."
@echo "- ... recompiles the handlebar templates"
@echo
@echo "clean. Removes all generated sources."
@echo
@echo "uses to infer whether re-compilation is necessary."
@echo
# production rules
src/%.template.js: src/%.template.hbs
./node_modules/.bin/handlebars --commonjs handlebars/runtime -f $@ $<
# "phony" targets
dev-build: $(GENERATED_SOURCES)
profile:
$(NODE) --prof src/cli.js -f - test
@echo "output will be in a file called 'isolate-xxxx-v8.log'"
@echo "- translate to readable output with:"
@echo " node --prof-process isolate-xxxx-v8.log | more"
clean:
$(RM) $(GENERATED_SOURCES)