forked from OpenDSA/OpenDSA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
311 lines (236 loc) · 8.81 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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
ifeq ($(OS),Windows_NT)
SHELL=C:/Windows/System32/cmd.exe
endif
RM = rm -rf
CONFIG_SCRIPT = tools/configure.py
TARGET = build
LINT = eslint --no-color
CSSOLDLINTFLAGS = --quiet --errors=empty-rules,import,errors --warnings=duplicate-background-images,compatible-vendor-prefixes,display-property-grouping,fallback-colors,duplicate-properties,shorthand,gradients,font-sizes,floats,overqualified-elements,import,regex-selectors,rules-count,unqualified-attributes,vendor-prefix,zero-units
CSSLINTFLAGS = --quiet --ignore=ids,adjoining-classes
MINIMIZE = uglifyjs
.PHONY: all clean alllint csslint lint lintExe jsonlint min testLTI test TestLMS
all: alllint
allbooks: Everything test CS2 CS3 RecurTutor PL
clean:
- $(RM) *~
- $(RM) Books
@# Remove minified JS and CSS files
- $(RM) lib/*-min.*
- $(RM) Doc/*~
- $(RM) Scripts/*~
- $(RM) config/*~
alllint: csslint lint jsonlint
csslint:
@echo 'running csslint'
@csslint $(CSSLINTFLAGS) AV/Background/*.css
@csslint $(CSSLINTFLAGS) AV/Design/*.css
TODOcsslint:
@csslint $(CSSLINTFLAGS) AV/List/*.css
@csslint $(CSSLINTFLAGS) AV/Sorting/*.css
@csslint $(CSSLINTFLAGS) AV/Hashing/*.css
@csslint $(CSSLINTFLAGS) AV/Searching/*.css
#@csslint $(CSSLINTFLAGS) AV/*.css
@csslint $(CSSLINTFLAGS) Doc/*.css
@csslint $(CSSLINTFLAGS) lib/*.css
lint: lintExe
@echo 'running eslint'
-@$(LINT) AV/Background/*.js
-@$(LINT) AV/Design/*.js
TODOlintAV:
@echo 'linting AVs'
-@$(LINT) AV/Binary/*.js
-@$(LINT) AV/General/*.js
-@$(LINT) AV/List/*.js
-@$(LINT) AV/Sorting/*.js
-@$(LINT) AV/Hashing/*.js
-@$(LINT) AV/Searching/*.js
-@$(LINT) AV/Sorting/*.js
lintExe:
@echo 'linting KA Exercises'
-@$(LINT) Exercises/AlgAnal/*.js
-@$(LINT) Exercises/Background/*.js
-@$(LINT) Exercises/Binary/*.js
-@$(LINT) Exercises/Design/*.js
-@$(LINT) Exercises/General/*.js
-@$(LINT) Exercises/Graph/*.js
-@$(LINT) Exercises/Hashing/*.js
-@$(LINT) Exercises/Indexing/*.js
-@$(LINT) Exercises/List/*.js
-@$(LINT) Exercises/RecurTutor/*.js
-@$(LINT) Exercises/RecurTutor2/*.js
-@$(LINT) Exercises/Sorting/*.js
TODO$(LINT)lib:
@echo 'linting libraries'
-@$(LINT) lib/odsaUtils.js
-@$(LINT) lib/odsaAV.js
-@$(LINT) lib/odsaMOD.js
-@$(LINT) lib/gradebook.js
-@$(LINT) lib/registerbook.js
-@$(LINT) lib/createcourse.js
-@$(LINT) lib/conceptMap.js
jsonlint:
@jsonlint -q AV/Background/*.json
@jsonlint -q AV/Design/*.json
@jsonlint -q config/*.json
@jsonlint -q config/Old/*.json
min: nomin
#lib/odsaUtils-min.js lib/site-min.css lib/odsaAV-min.js lib/odsaAV-min.css lib/odsaMOD-min.js lib/odsaMOD-min.css lib/gradebook-min.js lib/gradebook-min.css lib/registerbook-min.js
Plain: Everything CS2 CS3 PL
test_generated: Everything CS2 CS3 CS4104 FormalLang
Test: min
python $(CONFIG_SCRIPT) config/Test.json --no-lms
CT: min
python $(CONFIG_SCRIPT) config/CT.json --no-lms
EverythingPlain: min
python $(CONFIG_SCRIPT) config/Everything.json --no-lms
Everything: min
python tools/rst2json.py $@
python $(CONFIG_SCRIPT) config/Everything_generated.json --no-lms
CS2Plain: min
python $(CONFIG_SCRIPT) config/CS2.json --no-lms
CS2: min
python tools/rst2json.py $@
python $(CONFIG_SCRIPT) config/CS2_generated.json --no-lms
CS2114: min
python $(CONFIG_SCRIPT) config/CS2114.json --no-lms
CS3Plain: min
python $(CONFIG_SCRIPT) config/CS3.json --no-lms
CS3: min
python tools/rst2json.py $@
python $(CONFIG_SCRIPT) config/CS3_generated.json --no-lms
CSCI2101: min
python tools/rst2json.py $@
python $(CONFIG_SCRIPT) config/CSCI2101_generated.json --no-lms
CS327: min
python tools/rst2json.py $@
python $(CONFIG_SCRIPT) config/CS327_generated.json --no-lms
CS172: min
python $(CONFIG_SCRIPT) config/CS172.json --no-lms
ECE252: min
python $(CONFIG_SCRIPT) config/ECE252.json --no-lms
PLPlain: min
python $(CONFIG_SCRIPT) config/PL.json --no-lms
PL: min
python tools/rst2json.py $@
python $(CONFIG_SCRIPT) config/PL_generated.json --no-lms
# Tom Naps has added this target while he works on re-packaging the PL book
# He will remove it and the corresponding config file when that re-packaging is complete
PL-naps: min
python $(CONFIG_SCRIPT) config/PL-naps.json --no-lms
CS4104Plain: min
python $(CONFIG_SCRIPT) config/CS4104.json --no-lms
CS4104: min
python tools/rst2json.py $@
python $(CONFIG_SCRIPT) config/CS4104_generated.json --no-lms
NPTest: min
python $(CONFIG_SCRIPT) config/NPTest.json --no-lms
CSC215: min
python $(CONFIG_SCRIPT) config/CSC215.json --no-lms
Spatial: min
python tools/rst2json.py $@
python $(CONFIG_SCRIPT) config/Spatial_generated.json --no-lms
FormalLang: min
python $(CONFIG_SCRIPT) config/FormalLang.json --no-lms
FormalLangCanvas: min
python tools/rst2json.py $@
python $(CONFIG_SCRIPT) config/FormalLang_generated.json --no-lms
CS3slides: min
python $(CONFIG_SCRIPT) -s config/CS3slides.json --no-lms
CS3SS17slides: min
python $(CONFIG_SCRIPT) -s config/CS3SS17slides.json --no-lms
CS3notes: min
python $(CONFIG_SCRIPT) config/CS3slides.json -b CS3notes --no-lms
testcmap: min
python $(CONFIG_SCRIPT) config/testcmap.json --no-lms
CS150: min
python $(CONFIG_SCRIPT) config/CS150.json --no-lms
CS260: min
python $(CONFIG_SCRIPT) config/CS260.json --no-lms
CS240: min
python $(CONFIG_SCRIPT) config/CS240.json --no-lms
CS271-UWO: min
python $(CONFIG_SCRIPT) config/CS271-UWO.json --no-lms
CSCI204: min
python $(CONFIG_SCRIPT) config/CSCI204.json --no-lms
CSCI115: min
python $(CONFIG_SCRIPT) config/CSCI115.json --no-lms
COSC2436: min
python $(CONFIG_SCRIPT) config/COSC2436.json --no-lms
COMP232: min
python $(CONFIG_SCRIPT) config/COMP232.json --no-lms
SDAP13: min
python $(CONFIG_SCRIPT) config/SDAP13.json --no-lms
simple_demo: min
python $(CONFIG_SCRIPT) config/simple_demo.json --no-lms
cs342_uwosh: min
python $(CONFIG_SCRIPT) config/cs342_uwosh.json --no-lms
PointersCPP: min
python $(CONFIG_SCRIPT) config/PointersCPP.json --no-lms
PointersJava: min
python tools/rst2json.py $@
python $(CONFIG_SCRIPT) config/PointersJava_generated.json --no-lms
PointersJavaP: min
python $(CONFIG_SCRIPT) config/PointersJava.json --no-lms
CS3_exs: min
python $(CONFIG_SCRIPT) config/CS3_exs.json --no-lms
JFLAP: min
python $(CONFIG_SCRIPT) config/JFLAP.json --no-lms
nomin:
@cp JSAV/build/JSAV.js JSAV/build/JSAV-min.js
@cp lib/odsaUtils.js lib/odsaUtils-min.js
@cp lib/odsaMOD.js lib/odsaMOD-min.js
@cp lib/odsaAV.js lib/odsaAV-min.js
@cp lib/odsaKA.js lib/odsaKA-min.js
@cp lib/gradebook.js lib/gradebook-min.js
@cp lib/registerbook.js lib/registerbook-min.js
@cp lib/site.css lib/site-min.css
@cat lib/normalize.css lib/odsaAV.css > lib/odsaAV-min.css
@cp lib/odsaMOD.css lib/odsaMOD-min.css
@cp lib/odsaStyle.css lib/odsaStyle-min.css
@cp lib/odsaKA.css lib/odsaKA-min.css
@cp lib/gradebook.css lib/gradebook-min.css
rst2json:
python tools/rst2json.py
pull:
git pull
git submodule init
git submodule update
make -s -C JSAV
make -s min
make -C Doc
lib/odsaUtils-min.js: lib/odsaUtils.js
@echo 'Minimizing lib/odsaUtils.js'
@$(MINIMIZE) lib/odsaUtils.js --comments '/^!|@preserve|@license|@cc_on/i' > lib/odsaUtils-min.js
lib/site-min.css: lib/site.css
@echo 'Minimizing lib/site.css'
-@$(MINIMIZE) lib/site.css --comments '/^!|@preserve|@license|@cc_on/i' > lib/site-min.css
lib/odsaAV-min.js: lib/odsaAV.js
@echo 'Minimizing lib/odsaAV.js'
@$(MINIMIZE) lib/odsaAV.js --comments '/^!|@preserve|@license|@cc_on/i' > lib/odsaAV-min.js
lib/odsaKA-min.js: lib/odsaKA.js
@echo 'Minimizing lib/odsaKA.js'
@$(MINIMIZE) lib/odsaKA.js --comments '/^!|@preserve|@license|@cc_on/i' > lib/odsaKA-min.js
lib/odsaAV-min.css: lib/odsaAV.css
@echo 'Minimizing lib/odsaAV.css'
@$(MINIMIZE) lib/odsaAV.css --comments '/^!|@preserve|@license|@cc_on/i' > lib/odsaAV-min.css
lib/odsaKA-min.css: lib/odsaKA.css
@echo 'Minimizing lib/odsaKA.css'
@$(MINIMIZE) lib/odsaKA.css --comments '/^!|@preserve|@license|@cc_on/i' > lib/odsaKA-min.css
lib/odsaMOD-min.js: lib/odsaMOD.js
@echo 'Minimizing lib/odsaMOD.js'
@$(MINIMIZE) lib/odsaMOD.js --comments '/^!|@preserve|@license|@cc_on/i' > lib/odsaMOD-min.js
lib/odsaMOD-min.css: lib/odsaMOD.css
@echo 'Minimizing lib/odsaMOD.css'
@$(MINIMIZE) lib/odsaMOD.css --comments '/^!|@preserve|@license|@cc_on/i' > lib/odsaMOD-min.css
lib/gradebook-min.js: lib/gradebook.js
@echo 'Minimizing lib/gradebook.js'
@$(MINIMIZE) lib/gradebook.js --comments '/^!|@preserve|@license|@cc_on/i' > lib/gradebook-min.js
lib/gradebook-min.css: lib/gradebook.css
@echo 'Minimizing lib/gradebook.css'
@$(MINIMIZE) lib/gradebook.css --comments '/^!|@preserve|@license|@cc_on/i' > lib/gradebook-min.css
lib/registerbook-min.js: lib/registerbook.js
@echo 'Minimizing lib/registerbook.js'
@$(MINIMIZE) lib/registerbook.js --comments '/^!|@preserve|@license|@cc_on/i' > lib/registerbook-min.js
lib/createcourse-min.js: lib/createcourse.js
@echo 'Minimizing lib/createcourse.js'
@$(MINIMIZE) lib/createcourse.js --comments '/^!|@preserve|@license|@cc_on/i' > lib/createcourse-min.js