css jsピクチャ圧縮バッチ処理コマンド(YUI Copresterによる)


 
@echo off
:: YUI Compressor
SET YUIFOLDER=D:\yuicompressor-2.4.2\build\

:: JS CSS , JS CSS
SET INFOLDER=D:\jscss\src
SET OUTFOLDER=D:\jscss\build
echo JavaScript, CSS ...
chdir /d %INFOLDER%

for /r . %%a in (*.js *.css) do (
copy %%a "%OUTFOLDER%\" && echo %%~fa || echo %%~fa , !
@echo %%~a ...
@java -jar %YUIFOLDER%\yuicompressor-2.4.2.jar --charset UTF-8 %%~fa -o %%~fa
)
@echo CSS JS !

for /r . %%b in (*.gif) do (
@echo gif...
@pngout %%~fb /kp
del /q/f %%~fb
)

@echo gif !

for /r . %%c in (*.png) do (
@echo png...
@pngout %%~fc
)

@echo png !

pause & exit