forked from sverweij/dependency-cruiser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
246 lines (191 loc) · 5.63 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
.SUFFIXES: .js .css .html
GIT=git
GIT_CURRENT_BRANCH=$(shell utl/get_current_git_branch.sh)
GIT_DEPLOY_FROM_BRANCH=master
NPM=npm
NODE=node
RM=rm -f
MAKEDEPEND=node_modules/.bin/js-makedepend --exclude "node_modules|fixtures|extractor-fixtures" --system cjs
GENERATED_SOURCES=src/report/csv.template.js \
src/report/dot.template.js \
src/report/html.template.js
.PHONY: help dev-build install check fullcheck mostlyclean clean lint cover prerequisites static-analysis test update-dependencies run-update-dependencies depend
help:
@echo
@echo " -------------------------------------------------------- "
@echo "| More information and other targets: open the Makefile |"
@echo " -------------------------------------------------------- "
@echo
# production rules
src/report/%.template.js: src/report/%.template.hbs
handlebars --commonjs handlebars/runtime -f $@ $<
# "phony" targets
prerequisites:
$(NPM) install
dev-build: bin/dependency-cruise $(GENERATED_SOURCES) $(ALL_SRC)
lint:
$(NPM) run lint
cover: dev-build
$(NPM) run cover
bump-patch:
$(NPM) version patch
bump-minor:
$(NPM) version minor
bump-major:
$(NPM) version major
tag:
$(GIT) tag -a v`utl/getver` -m "v`utl/getver`"
$(GIT) push --tags
publish:
$(GIT) push
$(GIT) push --tags
$(NPM) publish
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"
test: dev-build
$(NPM) run test
nsp:
$(NPM) run nsp
outdated:
$(NPM) outdated
update-dependencies: run-update-dependencies dev-build test
$(GIT) diff package.json
run-update-dependencies:
$(NPM) run npm-check-updates
$(NPM) install
dependency-cruise:
./bin/dependency-cruise -T err -r .dependency-cruiser-custom.json src
check: lint test dependency-cruise
./bin/dependency-cruise --version # if that runs the cli script works
fullcheck: check outdated nsp
depend:
$(MAKEDEPEND) src/index.js
$(MAKEDEPEND) --append --flat-define ALL_SRC src/index.js
$(MAKEDEPEND) --append test
clean:
$(RM) $(GENERATED_SOURCES)
# DO NOT DELETE THIS LINE -- js-makedepend depends on it.
# cjs dependencies
src/index.js: \
package.json \
src/cli/index.js
src/cli/index.js: \
src/cli/optionNormalizer.js \
src/cli/parameterValidator.js \
src/extract/index.js \
src/report/csvReporter.js \
src/report/dotReporter.js \
src/report/errReporter.js \
src/report/htmlReporter.js \
src/report/jsonReporter.js
src/extract/index.js: \
src/extract/extractor.js \
src/utl/index.js
src/extract/extractor.js: \
src/extract/extractor-AMD.js \
src/extract/extractor-ES6.js \
src/extract/extractor-commonJS.js \
src/extract/resolver.js \
src/utl/index.js \
src/validate/validator.js
src/validate/validator.js: \
src/validate/ruleSetNormalizer.js \
src/validate/ruleSetValidator.js
src/extract/extractor-AMD.js: \
src/extract/extractor-commonJS.js
src/extract/resolver.js: \
src/utl/index.js
src/report/csvReporter.js: \
src/report/csv.template.js \
src/report/dependencyToIncidenceTransformer.js
src/report/dotReporter.js: \
src/report/dot.template.js
src/report/htmlReporter.js: \
src/report/dependencyToIncidenceTransformer.js \
src/report/html.template.js
src/cli/parameterValidator.js: \
src/utl/index.js
# cjs dependencies
ALL_SRC=src/index.js \
package.json \
src/cli/index.js \
src/cli/optionNormalizer.js \
src/cli/parameterValidator.js \
src/extract/extractor-AMD.js \
src/extract/extractor-ES6.js \
src/extract/extractor-commonJS.js \
src/extract/extractor.js \
src/extract/index.js \
src/extract/resolver.js \
src/report/csv.template.js \
src/report/csvReporter.js \
src/report/dependencyToIncidenceTransformer.js \
src/report/dot.template.js \
src/report/dotReporter.js \
src/report/errReporter.js \
src/report/html.template.js \
src/report/htmlReporter.js \
src/report/jsonReporter.js \
src/utl/index.js \
src/validate/ruleSetNormalizer.js \
src/validate/ruleSetValidator.js \
src/validate/validator.js
# cjs dependencies
test/cli.index.spec.js: \
src/cli/index.js \
test/utl/testutensils.js
src/cli/index.js: \
src/cli/optionNormalizer.js \
src/cli/parameterValidator.js \
src/extract/index.js \
src/report/csvReporter.js \
src/report/dotReporter.js \
src/report/errReporter.js \
src/report/htmlReporter.js \
src/report/jsonReporter.js
src/extract/index.js: \
src/extract/extractor.js \
src/utl/index.js
src/extract/extractor.js: \
src/extract/extractor-AMD.js \
src/extract/extractor-ES6.js \
src/extract/extractor-commonJS.js \
src/extract/resolver.js \
src/utl/index.js \
src/validate/validator.js
src/validate/validator.js: \
src/validate/ruleSetNormalizer.js \
src/validate/ruleSetValidator.js
src/extract/extractor-AMD.js: \
src/extract/extractor-commonJS.js
src/extract/resolver.js: \
src/utl/index.js
src/report/csvReporter.js: \
src/report/csv.template.js \
src/report/dependencyToIncidenceTransformer.js
src/report/dotReporter.js: \
src/report/dot.template.js
src/report/htmlReporter.js: \
src/report/dependencyToIncidenceTransformer.js \
src/report/html.template.js
src/cli/parameterValidator.js: \
src/utl/index.js
test/cli.optionNormalizer.spec.js: \
src/cli/optionNormalizer.js
test/cli.parameterValidator.spec.js: \
src/cli/parameterValidator.js
test/extract.extractor-composite.spec.js: \
src/extract/index.js
test/extract.extractor.spec.js: \
src/extract/extractor.js
test/report.dotReporter.spec.js: \
src/report/dotReporter.js
test/report.errReporter.spec.js: \
src/report/errReporter.js
test/validate.ruleSetNormalizer.js: \
src/validate/ruleSetNormalizer.js
test/validate.validator.spec.js: \
src/validate/validator.js