-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
executable file
·129 lines (86 loc) · 3.77 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
# See documentation: http://yui.github.io/yuicompressor/
# Set the source directory
srcdir = public/vi-lab/js/
# Create the list of modules
js_basic = ${srcdir}jquery-1.5.2.js\
${srcdir}jquery-ui-1.8.6.custom.min.js\
${srcdir}jquery.tinysort.js\
${srcdir}jquery.tooltip.js\
${srcdir}intro.min.js\
# Create the list of modules
js_files = ./public/etutor/static/lib/vi-two/src/*.js
#<script type='text/javascript' src='/vi-lab/js/vi2.highlight.js'></script
# Set css source directory
css_srcdir = public/vi-lab/css/
# Create the list of modules
css_files = ${css_srcdir}ui-lightness/jquery-ui-1.7.2.custom.css\
${css_srcdir}jquery.hrzAccordion.defaults.css\
${css_srcdir}vi2.main.css\
${css_srcdir}vi2.videoplayer.css\
${css_srcdir}videolab.css\
${css_srcdir}theresienstadt.css\
${css_srcdir}colorbox.css\
${css_srcdir}vi2.assessment.css\
${css_srcdir}vi2.assessment-fill-in.css\
${css_srcdir}vi2.assessment-writing.css\
${css_srcdir}introjs.css\
css_basic = ${css_srcdir}ui-lightness/jquery-ui-1.7.2.custom.css\
${css_srcdir}jquery.hrzAccordion.defaults.css\
${css_srcdir}videolab.css\
${css_srcdir}theresienstadt.css\
${css_srcdir}introjs.css\
## VI-TWO
# test vi-two
test: ${js_files}
@echo "***************************************";\
@echo "**** find alerts *********";\
@echo "***************************************";\
cat -n $^ | grep -H 'alert(' | sed '/\/\/alert/g' ;\
@echo "***************************************";\
@echo "**** jshint *********";\
@echo "***************************************";\
jshint $^;\
# Bundle vi-two, all of the modules into vi-two.js
js: ${js_files}
cat $^ > public/etutor/static/js/vi-two.js
# Compress vi-two, all of the modules into vi-two.min.js
js-min: ${js_files}
cat $^ > public/etutor/static/js/vi-two.js
#java -jar /usr/bin/compiler.jar --js public/etutor/static/js/vi-two.js --js_output_file public/etutor/static/js/vi-two.min.js
# java -jar tools/yuicompressor-2.4.8.jar public/vi-lab/js/vi-two.js -o public/vi-lab/js/vi-two.min.js
gjslint --nojsdoc -r public/etutor/static/js/vi-two.js
# LIB
# Compress al of the modules into vi-two.min.js
js-basic: ${js_basic}
cat $^ > public/vi-lab/js/vi-lab-basic.js
java -jar /usr/bin/compiler.jar --js public/vi-lab/js/vi-lab-basic.js --js_output_file public/vi-lab/js/vi-lab-basic.min.js
# java -jar ./_tools/yuicompressor-2.4.8.jar public/vi-lab/js/vi-two.js -o public/vi-lab/js/vi-two.min.js
# bundle css files
css: ${css_files}
cat $^ > public/vi-lab/css/vi-two-style.css
# bundle and compress css files
css-min: ${css_files}
cat $^ > public/vi-lab/css/vi-two-style.css
java -jar ./_tools/yuicompressor-2.4.8.jar ./public/vi-lab/css/vi-two-style.css -o public/vi-lab/css/vi-two-style.min.css
css-basic: ${css_basic}
cat $^ > public/vi-lab/css/vi-basic-style.css
java -jar ./_tools/yuicompressor-2.4.8.jar ./public/vi-lab/css/vi-basic-style.css -o public/vi-lab/css/vi-basic-style.min.css
all:
make css-min
make js-min
make css-basic
make js-basic
# generate documentation of vi-two
# setup jsdoc:
# 1) JSDOCDIR="$HOME/Documents/www/elearning/vi2/vi-two/tools/jsdoc/jsdoc-toolkit"
# 2) JSDOCTEMPLATEDIR="$JSDOCDIR/templates/jsdoc"
# 3) make documentation
documentation: $(vi2)
#cat $^ > vi2doc.js
java -jar tools/jsdoc/jsdoc-toolkit/jsrun.jar tools/jsdoc/jsdoc-toolkit/app/run.js -a -t=tools/jsdoc/jsdoc-toolkit/templates/jsdoc $^
# copy docs to the dedicated folder
cp -r tools/jsdoc/jsdoc-toolkit/out/jsdoc/* doc/
#
iwrm: ${modules}
cat $^ > examples/iwrm/js/vi-two.js
java -jar /usr/bin/compiler.jar --js examples/iwrm/js/vi-two.js --js_output_file examples/iwrm/js/vi-two.min.js