forked from microsoft/TypeScriptSamples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildall.cmd
71 lines (54 loc) · 1.79 KB
/
buildall.cmd
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
@echo off & setlocal EnableDelayedExpansion
if "%1"=="" (
goto :Help
)
goto :Start
:Help
Echo **********************************************************
Echo Usage:
Echo buildall.cmd tscPath
Echo Example:
Echo buildall c:\typescript\built\local\tsc.js
Echo **********************************************************
goto :Done
:Start
set tscPath=%1
set CURRENTDIR=%~dp0
call :buildProject "amd" "--sourcemap --module amd %CURRENTDIR%amd\app.ts"
call :buildProject "d3" "--sourcemap %CURRENTDIR%d3\data.ts"
call :buildProject "greeter" "--sourcemap %CURRENTDIR%greeter\greeter.ts"
call :buildProject "imageboard" "--sourcemap --module commonjs %CURRENTDIR%imageboard\app.ts"
call :buildProject "interfaces" "--sourcemap %CURRENTDIR%interfaces\interfaces.ts"
call :buildProject "jquery" "--sourcemap --target ES5 %CURRENTDIR%jquery\parallax.ts"
call :buildProject "mankala" "Driver.ts --sourcemap -out %CURRENTDIR%mankalagame.js"
call :buildProject "node" "--sourcemap --module commonjs %CURRENTDIR%node\HttpServer.ts"
call :buildProject "node" "--sourcemap --module commonjs %CURRENTDIR%node\TcpServer.ts"
call :buildProject "raytracer" "--sourcemap %CURRENTDIR%raytracer\raytracer.ts"
call :buildProject "simple" "--sourcemap %CURRENTDIR%simple\animals.ts"
call :buildProject "todomvc" "--sourcemap %CURRENTDIR%todomvc\js\todos.ts"
call :buildProject "warship" "--sourcemap --target ES5 %CURRENTDIR%warship\warship.ts"
goto :Done
:buildProject
pushd %CURRENTDIR%%~1
echo Running %~1 using node...
echo on
call node "%tscPath%" %~2
echo off
if not %errorlevel%==0 (
echo Failed!
) else (
echo Done.
)
echo Running %~1 using cscript...
echo on
call cscript /nologo "%tscPath%" %~2
echo off
if not %errorlevel%==0 (
echo Failed!
) else (
echo Done.
)
popd
goto :eof
:Done
ENDLOCAL