-
Notifications
You must be signed in to change notification settings - Fork 0
/
comp.bat
37 lines (31 loc) · 1.01 KB
/
comp.bat
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
@echo off
del dist.zip /Q
del debug.zip /Q
del log.txt /Q
xcopy source dist\source /I /s
FOR %%G IN (source\js\*.js) DO (
echo ### processing %%G
echo ### processing %%G >> log.txt
java -jar compiler-v20130823.jar --language_in=ECMASCRIPT5 --js=%%G --js_output_file=dist\%%G 2>>log.txt
)
FOR %%G IN (source\css\*.css) DO (
echo ### processing %%G
echo ### processing %%G >> log.txt
java -jar yuicompressor.jar --type css %%G -o dist\%%G -v --charset utf-8 2>>log.txt
)
FOR %%G IN (source\*.html) DO (
echo ### processing %%G
echo ### processing %%G >> log.txt
java -jar htmlcompressor-1.5.3.jar --remove-intertag-spaces %%G -o dist\%%G 2>>log.txt
)
echo: >> log.txt
echo ### compressing dist
echo ### compressing dist >> log.txt
"C:\Program Files (x86)\7-Zip\7z.exe" -tzip -mx=9 a dist.zip .\dist\source\* 2>>log.txt
echo: >> log.txt
echo ### compressing debug
echo ### compressing debug >> log.txt
"C:\Program Files (x86)\7-Zip\7z.exe" -tzip -mx=9 a debug.zip .\source\* 2>>log.txt
rd dist /s /Q
type log.txt
pause