Christian Fraß commited on 2021-03-12 22:00:54
              Zeige 4 geänderte Dateien mit 61 Einfügungen und 3 Löschungen.
            
| ... | ... | 
                      @@ -1,4 +1,28 @@  | 
                  
| 1 | 1 | 
                        #!/usr/bin/env bash  | 
                    
| 2 | 2 | 
                         | 
                    
| 3 | 
                        +## const  | 
                    |
| 4 | 
                        +  | 
                    |
| 5 | 
                        +dir_conf="conf"  | 
                    |
| 6 | 
                        +dir_build="build"  | 
                    |
| 7 | 
                        +  | 
                    |
| 8 | 
                        +  | 
                    |
| 9 | 
                        +## args  | 
                    |
| 10 | 
                        +  | 
                    |
| 11 | 
                        +if [ $# -ge 1 ] ; then profile=$1 && shift ; else profile="-" ; fi  | 
                    |
| 12 | 
                        +  | 
                    |
| 13 | 
                        +  | 
                    |
| 14 | 
                        +## exec  | 
                    |
| 15 | 
                        +  | 
                    |
| 16 | 
                        +### compiling  | 
                    |
| 17 | 
                        +echo ">> building …" 1>&2  | 
                    |
| 3 | 18 | 
                        make --file=tools/makefile  | 
                    
| 4 | 19 | 
                         | 
                    
| 20 | 
                        +### placing conf  | 
                    |
| 21 | 
                        +if [ ${profile} = "" ]
                       | 
                    |
| 22 | 
                        +then  | 
                    |
| 23 | 
                        + echo ">> no profile specified; won't place conf" 1>&2  | 
                    |
| 24 | 
                        +else  | 
                    |
| 25 | 
                        +	echo ">> placing conf for profile '${profile}' …" 1>&2
                       | 
                    |
| 26 | 
                        +	cp ${dir_conf}/${profile}.json ${dir_build}/conf.json
                       | 
                    |
| 27 | 
                        +fi  | 
                    |
| 28 | 
                        +  | 
                    
| ... | ... | 
                      @@ -12,6 +12,7 @@ cmd_log := echo "--"  | 
                  
| 12 | 12 | 
                        cmd_copy := cp --recursive --update --verbose  | 
                    
| 13 | 13 | 
                        cmd_concatenate := cat  | 
                    
| 14 | 14 | 
                        cmd_dir_make := mkdir --parents  | 
                    
| 15 | 
                        +cmd_tsc := tsc --lib dom,es2016 --target ES6  | 
                    |
| 15 | 16 | 
                        cmd_sassc := sassc  | 
                    
| 16 | 17 | 
                         | 
                    
| 17 | 18 | 
                         | 
                    
| ... | ... | 
                      @@ -30,15 +31,25 @@ ${dir_temp}/plankton.js:
                     | 
                  
| 30 | 31 | 
                         	@ ${cmd_dir_make} ${dir_temp}
                       | 
                    
| 31 | 32 | 
                         	@ schwamm --include=${dir_lib}/plankton/plankton.swm.json --output=dump:logic-impl > ${dir_temp}/plankton.js
                       | 
                    
| 32 | 33 | 
                         | 
                    
| 33 | 
                        -${dir_build}/index.html: ${dir_source}/structure.html
                       | 
                    |
| 34 | 
                        +${dir_build}/index.html: ${dir_source}/main.html
                       | 
                    |
| 34 | 35 | 
                         	@ ${cmd_log} "structure …"
                       | 
                    
| 35 | 36 | 
                         	@ ${cmd_dir_make} ${dir_build}
                       | 
                    
| 36 | 37 | 
                         	@ ${cmd_copy} $^ $@
                       | 
                    
| 37 | 38 | 
                         | 
                    
| 38 | 
                        -${dir_temp}/logic-unlinked.js: ${dir_source}/logic.js
                       | 
                    |
| 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
                       | 
                    |
| 39 | 50 | 
                         	@ ${cmd_log} "logic:compiling …"
                       | 
                    
| 40 | 51 | 
                         	@ ${cmd_dir_make} ${dir_temp}
                       | 
                    
| 41 | 
                        -	@ ${cmd_concatenate} $^ > $@
                       | 
                    |
| 52 | 
                        +	@ ${cmd_tsc} $^ --outFile $@
                       | 
                    |
| 42 | 53 | 
                         | 
                    
| 43 | 54 | 
                         ${dir_build}/logic.js: ${dir_temp}/plankton.js ${dir_temp}/logic-unlinked.js
                       | 
                    
| 44 | 55 | 
                         	@ ${cmd_log} "logic:linking …"
                       | 
                    
| ... | ... | 
                      @@ -0,0 +1,19 @@  | 
                  
| 1 | 
                        +#!/usr/bin/env bash  | 
                    |
| 2 | 
                        +  | 
                    |
| 3 | 
                        +## consts  | 
                    |
| 4 | 
                        +path="lib/plankton"  | 
                    |
| 5 | 
                        +modules=()  | 
                    |
| 6 | 
                        +modules+=("string")
                       | 
                    |
| 7 | 
                        +modules+=("json")
                       | 
                    |
| 8 | 
                        +modules+=("object")
                       | 
                    |
| 9 | 
                        +modules+=("url")
                       | 
                    |
| 10 | 
                        +  | 
                    |
| 11 | 
                        +## exec  | 
                    |
| 12 | 
                        +rm --recursive ${path}
                       | 
                    |
| 13 | 
                        +mkdir --parents ${path}
                       | 
                    |
| 14 | 
                        +cd ${path}
                       | 
                    |
| 15 | 
                        +ptk fetch web ${modules[@]}
                       | 
                    |
| 16 | 
                        +cd -  | 
                    |
| 17 | 
                        +  | 
                    |
| 18 | 
                        +# rm -f temp/plankton.js  | 
                    |
| 19 | 
                        +  | 
                    |
| 0 | 20 |