e9e3770b3487d60657c1878aac243589384168c2
Christian Fraß [mod] client:translate

Christian Fraß authored 3 years ago

1) ## directories
2) 
Christian Fraß [add] client

Christian Fraß authored 3 years ago

3) dir_lib := lib
4) dir_source := source
5) dir_temp := temp
6) dir_build := build
7) 
Christian Fraß [mod] client:translate

Christian Fraß authored 3 years ago

8) 
Christian Fraß [add] client

Christian Fraß authored 3 years ago

9) ## commands
Christian Fraß [mod] client:translate

Christian Fraß authored 3 years ago

10) 
Christian Fraß [add] client

Christian Fraß authored 3 years ago

11) cmd_log := echo "--"
12) cmd_copy := cp --recursive --update --verbose
13) cmd_concatenate := cat
14) cmd_dir_make := mkdir --parents
Christian Fraß [add] client:tools:clear [a...

Christian Fraß authored 3 years ago

15) cmd_tsc := tsc --lib dom,es2016 --target ES6
Christian Fraß [mod] client:translate

Christian Fraß authored 3 years ago

16) cmd_sassc := sassc
17) 
Christian Fraß [add] client

Christian Fraß authored 3 years ago

18) 
19) ## rules
Christian Fraß [mod] client:translate

Christian Fraß authored 3 years ago

20) 
Christian Fraß [add] client

Christian Fraß authored 3 years ago

21) all: ${dir_build}/index.html ${dir_build}/logic.js ${dir_build}/style.css
22) .PHONY: all
23) 
24) ${dir_temp}/plankton.d.ts:
25) 	@ ${cmd_log} "fetching plankton declaration"
26) 	@ ${cmd_dir_make} ${dir_temp}
27) 	@ schwamm --include=${dir_lib}/plankton/plankton.swm.json --output=dump:logic-decl > ${dir_temp}/plankton.d.ts
28) 
29) ${dir_temp}/plankton.js:
30) 	@ ${cmd_log} "fetching plankton implementation"
31) 	@ ${cmd_dir_make} ${dir_temp}
32) 	@ schwamm --include=${dir_lib}/plankton/plankton.swm.json --output=dump:logic-impl > ${dir_temp}/plankton.js
33) 
Christian Fraß [add] client:tools:clear [a...

Christian Fraß authored 3 years ago

34) ${dir_build}/index.html: ${dir_source}/main.html
Christian Fraß [add] client

Christian Fraß authored 3 years ago

35) 	@ ${cmd_log} "structure …"
36) 	@ ${cmd_dir_make} ${dir_build}
37) 	@ ${cmd_copy} $^ $@
38) 
Christian Fraß [add] client:tools:clear [a...

Christian Fraß authored 3 years ago

39) ${dir_temp}/logic-unlinked.js: \
40) 	${dir_temp}/plankton.d.ts \
41) 	${dir_source}/conf.ts \
42) 	${dir_source}/widgets/widget.ts \
43) 	${dir_source}/widgets/languagechooser/logic.ts \
44) 	${dir_source}/widgets/correlation/logic.ts \
45) 	${dir_source}/widgets/translate/logic.ts \
46) 	${dir_source}/pages/page.ts \
47) 	${dir_source}/pages/portal/logic.ts \
48) 	${dir_source}/services/service.ts \
49) 	${dir_source}/main.ts
Christian Fraß [add] client

Christian Fraß authored 3 years ago

50) 	@ ${cmd_log} "logic:compiling …"
51) 	@ ${cmd_dir_make} ${dir_temp}
Christian Fraß [add] client:tools:clear [a...

Christian Fraß authored 3 years ago

52) 	@ ${cmd_tsc} $^ --outFile $@
Christian Fraß [add] client

Christian Fraß authored 3 years ago

53) 
54) ${dir_build}/logic.js: ${dir_temp}/plankton.js ${dir_temp}/logic-unlinked.js
55) 	@ ${cmd_log} "logic:linking …"
56) 	@ ${cmd_dir_make} ${dir_build}
57) 	@ ${cmd_concatenate} $^ > $@
58) 
Christian Fraß [mod] client:translate

Christian Fraß authored 3 years ago

59) ${dir_build}/style.css: ${dir_source}/style.sass
Christian Fraß [add] client

Christian Fraß authored 3 years ago

60) 	@ ${cmd_log} "style …"
Christian Fraß [mod] client:translate

Christian Fraß authored 3 years ago

61) 	@ ${cmd_concatenate} $^ | ${cmd_sassc} --stdin > $@