forked from sverweij/dependency-cruiser
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
80 lines (71 loc) · 2.52 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
.SUFFIXES: .js .css .html
NODE=node
RM=rm -f
GENERATED_SOURCES=src/cli/init-config/config.js.template.js \
src/report/dot/dot.template.js \
src/report/html/html.template.js \
src/report/error-html/error-html.template.js \
src/schema/baseline-violations.schema.js \
src/schema/configuration.schema.js \
src/schema/cruise-result.schema.js \
src/schema/baseline-violations.schema.json \
src/schema/configuration.schema.json \
src/schema/cruise-result.schema.json \
src/meta.js
SCHEMA_SOURCES=tools/schema/baseline-violations.schema.mjs \
tools/schema/cache-options.mjs \
tools/schema/cache-strategy-type.mjs \
tools/schema/compound-donot-follow-type.mjs \
tools/schema/compound-exclude-type.mjs \
tools/schema/compound-focus-type.mjs \
tools/schema/compound-include-only-type.mjs \
tools/schema/configuration.schema.mjs \
tools/schema/cruise-result.schema.mjs \
tools/schema/dependencies.mjs \
tools/schema/dependency-type.mjs \
tools/schema/folders.mjs \
tools/schema/module-system-type.mjs \
tools/schema/module-systems-type.mjs \
tools/schema/modules.mjs \
tools/schema/options-used.mjs \
tools/schema/options.mjs \
tools/schema/output-type.mjs \
tools/schema/re-as-strings-type.mjs \
tools/schema/reporter-options.mjs \
tools/schema/restrictions.mjs \
tools/schema/revision-data.mjs \
tools/schema/rule-set.mjs \
tools/schema/rule-summary.mjs \
tools/schema/severity-type.mjs \
tools/schema/summary.mjs \
tools/schema/violation-type.mjs \
tools/schema/violations.mjs
.PHONY: help build clean
# "phony" targets
build: $(GENERATED_SOURCES)
clean:
$(RM) $(GENERATED_SOURCES)
help:
@echo
@echo " -------------------------------------------------------- "
@echo "| More information and other targets: open the Makefile |"
@echo " -------------------------------------------------------- "
@echo
@echo "Useful targets:"
@echo
@echo "build. When necessary this ..."
@echo " - ... recompiles the handlebar templates"
@echo " - ... re-generates the json schema"
@echo
@echo "clean. Removes all generated sources."
@echo
# production rules
src/%.template.js: src/%.template.hbs
npx handlebars --min --commonjs handlebars/runtime -f $@ $<
src/%.schema.js: tools/%.schema.mjs $(SCHEMA_SOURCES) tools/generate-schemas.utl.mjs
$(NODE) ./tools/generate-schemas.utl.mjs $@
src/%.schema.json: tools/%.schema.mjs $(SCHEMA_SOURCES) tools/generate-schemas.utl.mjs
$(NODE) ./tools/generate-schemas.utl.mjs $@
src/meta.js: package.json tools/generate-meta.utl.mjs
$(NODE) ./tools/generate-meta.utl.mjs < $< > $@
npx prettier --write $@