This commit is contained in:
alay 2017-11-30 10:04:02 +01:00
parent 63bda27fef
commit 68ed825fc4
17 changed files with 0 additions and 135 deletions

View file

@ -1,43 +0,0 @@
@echo off
set LOCAL_DIR=%~dp0
set LOCAL_DIR=%LOCAL_DIR:~0,-1%
set SOURCE=%~1
:LOOP
if "%~1"=="" GOTO END
if /I "%~1"=="-d" set "SOURCE=..\..\img"
if /I "%~1"=="-jtran" GOTO JPEGTRAN
if /I "%~1"=="-pout" GOTO PNGOUT
if /I "%~1"=="-optip" GOTO OPTIPNG
if /I "%~1"=="-pquant" GOTO PNGQUANT
if /I "%~1"=="-gsicle" GOTO GIFSICLE
if /I "%~1"=="-svgo" GOTO SVGO
SHIFT & GOTO LOOP
:JPEGTRAN
call %LOCAL_DIR%\jpegtran.bat "%SOURCE%"
SHIFT & GOTO LOOP
:PNGOUT
call %LOCAL_DIR%\pngout.bat "%SOURCE%"
SHIFT & GOTO LOOP
:OPTIPNG
call %LOCAL_DIR%\optipng.bat "%SOURCE%"
SHIFT & GOTO LOOP
:PNGQUANT
call %LOCAL_DIR%\pngquant.bat "%SOURCE%"
SHIFT & GOTO LOOP
:GIFSICLE
call %LOCAL_DIR%\gifsicle.bat "%SOURCE%"
SHIFT & GOTO LOOP
:SVGO
call %LOCAL_DIR%\svgo.bat "%SOURCE%"
SHIFT & GOTO LOOP
:END
pause

View file

@ -1,9 +0,0 @@
@echo on
set LOCAL_DIR=%~dp0
set LOCAL_DIR=%LOCAL_DIR:~0,-1%
if "%~1"=="" (set "SOURCE=..\..\img") else (set "SOURCE=%~1")
echo Optimizing GIF with gifsicle
forfiles /p %SOURCE% /s /m "*.gif" /c "cmd /c echo processing @path && %LOCAL_DIR%\gifsicle.exe -b -O3 @path"
pause

Binary file not shown.

View file

@ -1,9 +0,0 @@
@echo on
set LOCAL_DIR=%~dp0
set LOCAL_DIR=%LOCAL_DIR:~0,-1%
if "%~1"=="" (set "SOURCE=..\..\img") else (set "SOURCE=%~1")
echo Optimizing JPEG with jpegtran
forfiles /p %SOURCE% /s /m "*.jpg" /c "cmd /c echo processing @path && %LOCAL_DIR%\jpegtran.exe -optimize -progressive -copy none -outfile @path @path"
pause

Binary file not shown.

View file

@ -1,9 +0,0 @@
@echo on
set LOCAL_DIR=%~dp0
set LOCAL_DIR=%LOCAL_DIR:~0,-1%
if "%~1"=="" (set "SOURCE=..\..\img") else (set "SOURCE=%~1")
echo Optimizing PNG with optipng
forfiles /p %SOURCE% /s /m "*.png" /c "cmd /c echo processing @path && %LOCAL_DIR%\optipng.exe -force -o7 @path"
pause

Binary file not shown.

View file

@ -1,9 +0,0 @@
@echo on
set LOCAL_DIR=%~dp0
set LOCAL_DIR=%LOCAL_DIR:~0,-1%
if "%~1"=="" (set "SOURCE=..\..\img") else (set "SOURCE=%~1")
echo Optimizing PNG with pngout
forfiles /p %SOURCE% /s /m "*.png" /c "cmd /c echo processing @path && %LOCAL_DIR%\pngout.exe @path"
pause

Binary file not shown.

View file

@ -1,9 +0,0 @@
@echo on
set LOCAL_DIR=%~dp0
set LOCAL_DIR=%LOCAL_DIR:~0,-1%
if "%~1"=="" (set "SOURCE=..\..\img") else (set "SOURCE=%~1")
echo Optimizing PNG with pngquant
forfiles /p %SOURCE% /s /m "*.png" /c "cmd /c echo processing @path && %LOCAL_DIR%\pngquant.exe --skip-if-larger --force --ext .png @path"
pause

Binary file not shown.

View file

@ -1,7 +0,0 @@
@echo on
if "%~1"=="" (set "SOURCE=..\..\img") else (set "SOURCE=%~1")
echo Optimizing SVG with svgo
forfiles /p %SOURCE% /s /m "*.svg" /c "cmd /c echo processing @path && svgo @path"
pause

View file

@ -1,9 +0,0 @@
@echo on
set LOCAL_DIR=%~dp0
set LOCAL_DIR=%LOCAL_DIR:~0,-1%
if "%~1"=="" (set "SOURCE=..\..\js") else (set "SOURCE=%~1")
echo Optimizing js with yuicompressor
forfiles /p %SOURCE% /s /m "*.js" /c "cmd /c echo processing @path && java -jar %LOCAL_DIR%\yuicompressor-2.4.8.jar @path -o @fname.min.js"
pause

View file

@ -1,17 +0,0 @@
#!/bin/bash
if [ "$#" -ne 1 ]; then
FILES="../../js";
else
FILES=$1;
fi
for f in $FILES/*.js;
do
if [[ $f != *".min"* ]]; then
echo "Processing $f ..."
echo "java -jar yuicompressor-2.4.8.jar $f -o ${f%.js}.min.js"
java -jar yuicompressor-2.4.8.jar $f -o ${f%.js}.min.js
fi
done

View file

@ -1,10 +0,0 @@
@echo on
set LOCAL_DIR=%~dp0
set LOCAL_DIR=%LOCAL_DIR:~0,-1%
set "SOURCE=..\..\js"
echo Optimizing scripts.js to scripts.min.js
cd %SOURCE%
java -jar %LOCAL_DIR%\yuicompressor-2.4.8.jar scripts.js -o scripts.min.js
pause

View file

@ -1,4 +0,0 @@
#!/bin/bash
echo "Optimizing scripts.js to scripts.min.js"
java -jar yuicompressor-2.4.8.jar ../../js/scripts.js -o ../../js/scripts.min.js