comparison Deprecated/Resources/CodeGeneration/Graveyard/runts.ps1 @ 1401:f6a2d46d2b76

moved CodeGeneration into Deprecated
author Alain Mazy <alain@mazy.be>
date Wed, 29 Apr 2020 20:48:18 +0200
parents Resources/CodeGeneration/Graveyard/runts.ps1@1dbf2d9ed1e4
children
comparison
equal deleted inserted replaced
1400:419d0320c344 1401:f6a2d46d2b76
1 # echo "+----------------------+"
2 # echo "| playground.ts |"
3 # echo "+----------------------+"
4
5 # tsc -t ES2015 .\playground.ts; node .\playground.js
6
7 # echo "+----------------------+"
8 # echo "| playground3.ts |"
9 # echo "+----------------------+"
10
11 # tsc -t ES2015 .\playground3.ts; node .\playground3.js
12
13 echo "+----------------------+"
14 echo "| stonegen |"
15 echo "+----------------------+"
16
17 if(-not (test-Path "build")) {
18 mkdir "build"
19 }
20
21 echo "Generate the TS and CPP wrapper... (to build/)"
22 python stonegentool.py -o "." test_data/test1.yaml
23 if($LASTEXITCODE -ne 0) {
24 Write-Error ("Code generation failed!")
25 exit $LASTEXITCODE
26 }
27
28 echo "Compile the TS wrapper to JS... (in build/)"
29 tsc --module commonjs --sourceMap -t ES2015 --outDir "build/" VsolMessages_generated.ts
30 if($LASTEXITCODE -ne 0) {
31 Write-Error ("Code compilation failed!")
32 exit $LASTEXITCODE
33 }
34
35 echo "Compile the test app..."
36 tsc --module commonjs --sourceMap -t ES2015 --outDir "build/" test_stonegen.ts
37 if($LASTEXITCODE -ne 0) {
38 Write-Error ("Code compilation failed!")
39 exit $LASTEXITCODE
40 }
41
42 browserify "build/test_stonegen.js" "build/VsolMessages_generated.js" -o "build_browser/test_stonegen_fused.js"
43
44 cp .\test_stonegen.html .\build_browser\
45
46 echo "Run the test app..."
47 Push-Location
48 cd build_browser
49 node .\test_stonegen_fused.js
50 Pop-Location
51 if($LASTEXITCODE -ne 0) {
52 Write-Error ("Code execution failed!")
53 exit $LASTEXITCODE
54 }
55
56
57