comparison Resources/CodeGeneration/Graveyard/runts.ps1 @ 495:6405435480ae bgo-commands-codegen

Fixed template to add dump capabilities + started work on an integrated TS/WASM test
author bgo-osimis
date Sat, 23 Feb 2019 14:14:32 +0100
parents Resources/CodeGeneration/runts.ps1@fc17251477d6
children 1dbf2d9ed1e4
comparison
equal deleted inserted replaced
494:fc17251477d6 495:6405435480ae
1 # echo "+----------------------+"
2 # echo "| template.in.ts |"
3 # echo "+----------------------+"
4
5 # tsc -t ES2015 .\template.in.ts; node .\template.in.js
6
7 # echo "+----------------------+"
8 # echo "| playground.ts |"
9 # echo "+----------------------+"
10
11 # tsc -t ES2015 .\playground.ts; node .\playground.js
12
13 # echo "+----------------------+"
14 # echo "| playground3.ts |"
15 # echo "+----------------------+"
16
17 # tsc -t ES2015 .\playground3.ts; node .\playground3.js
18
19 echo "+----------------------+"
20 echo "| stonegen |"
21 echo "+----------------------+"
22
23 if(-not (test-Path "build")) {
24 mkdir "build"
25 }
26
27 echo "Generate the TS and CPP wrapper... (to build/)"
28 python stonegentool.py -o "." test_data/test1.yaml
29 if($LASTEXITCODE -ne 0) {
30 Write-Error ("Code generation failed!")
31 exit $LASTEXITCODE
32 }
33
34 echo "Compile the TS wrapper to JS... (in build/)"
35 tsc --module commonjs --sourceMap -t ES2015 --outDir "build/" VsolMessages_generated.ts
36 if($LASTEXITCODE -ne 0) {
37 Write-Error ("Code compilation failed!")
38 exit $LASTEXITCODE
39 }
40
41 echo "Compile the test app..."
42 tsc --module commonjs --sourceMap -t ES2015 --outDir "build/" test_stonegen.ts
43 if($LASTEXITCODE -ne 0) {
44 Write-Error ("Code compilation failed!")
45 exit $LASTEXITCODE
46 }
47
48 browserify "build/test_stonegen.js" "build/VsolMessages_generated.js" -o "build_browser/test_stonegen_fused.js"
49
50 cp .\test_stonegen.html .\build_browser\
51
52 echo "Run the test app..."
53 Push-Location
54 cd build_browser
55 node .\test_stonegen_fused.js
56 Pop-Location
57 if($LASTEXITCODE -ne 0) {
58 Write-Error ("Code execution failed!")
59 exit $LASTEXITCODE
60 }
61
62
63