mirror of
https://github.com/medialab-prado/datamad2017.git
synced 2025-06-07 22:11:29 +02:00
Initial commit
This commit is contained in:
parent
8e3b6da84f
commit
95607eea61
241 changed files with 14242 additions and 3 deletions
43
automation/images/all_image_optimization.bat
Normal file
43
automation/images/all_image_optimization.bat
Normal file
|
@ -0,0 +1,43 @@
|
|||
@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
|
9
automation/images/gifsicle.bat
Normal file
9
automation/images/gifsicle.bat
Normal file
|
@ -0,0 +1,9 @@
|
|||
@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
|
BIN
automation/images/gifsicle.exe
Normal file
BIN
automation/images/gifsicle.exe
Normal file
Binary file not shown.
9
automation/images/jpegtran.bat
Normal file
9
automation/images/jpegtran.bat
Normal file
|
@ -0,0 +1,9 @@
|
|||
@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
|
BIN
automation/images/jpegtran.exe
Normal file
BIN
automation/images/jpegtran.exe
Normal file
Binary file not shown.
9
automation/images/optipng.bat
Normal file
9
automation/images/optipng.bat
Normal file
|
@ -0,0 +1,9 @@
|
|||
@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
|
BIN
automation/images/optipng.exe
Normal file
BIN
automation/images/optipng.exe
Normal file
Binary file not shown.
9
automation/images/pngout.bat
Normal file
9
automation/images/pngout.bat
Normal file
|
@ -0,0 +1,9 @@
|
|||
@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
|
BIN
automation/images/pngout.exe
Normal file
BIN
automation/images/pngout.exe
Normal file
Binary file not shown.
9
automation/images/pngquant.bat
Normal file
9
automation/images/pngquant.bat
Normal file
|
@ -0,0 +1,9 @@
|
|||
@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
|
BIN
automation/images/pngquant.exe
Normal file
BIN
automation/images/pngquant.exe
Normal file
Binary file not shown.
7
automation/images/svgo.bat
Normal file
7
automation/images/svgo.bat
Normal file
|
@ -0,0 +1,7 @@
|
|||
@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
|
11
automation/minifying/minify_all.bat
Normal file
11
automation/minifying/minify_all.bat
Normal file
|
@ -0,0 +1,11 @@
|
|||
@echo off
|
||||
|
||||
set LOCAL_DIR=%~dp0
|
||||
set LOCAL_DIR=%LOCAL_DIR:~0,-1%
|
||||
set CSS_SOURCE=%~1
|
||||
set JS_SOURCE=%~2
|
||||
|
||||
call %LOCAL_DIR%\minify_css.bat "%CSS_SOURCE%"
|
||||
call %LOCAL_DIR%\minify_js.bat "%JS_SOURCE%"
|
||||
|
||||
pause
|
9
automation/minifying/minify_css.bat
Normal file
9
automation/minifying/minify_css.bat
Normal file
|
@ -0,0 +1,9 @@
|
|||
@echo on
|
||||
set LOCAL_DIR=%~dp0
|
||||
set LOCAL_DIR=%LOCAL_DIR:~0,-1%
|
||||
if "%~1"=="" (set "SOURCE=..\..\css") else (set "SOURCE=%~1")
|
||||
|
||||
echo Optimizing css with yuicompressor
|
||||
forfiles /p %SOURCE% /s /m "*.css" /c "cmd /c echo processing @path && java -jar %LOCAL_DIR%\yuicompressor-2.4.8.jar @path -o @fname.min.css"
|
||||
|
||||
pause
|
9
automation/minifying/minify_js.bat
Normal file
9
automation/minifying/minify_js.bat
Normal file
|
@ -0,0 +1,9 @@
|
|||
@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
|
10
automation/minifying/minify_scripts_js.bat
Normal file
10
automation/minifying/minify_scripts_js.bat
Normal file
|
@ -0,0 +1,10 @@
|
|||
@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
|
10
automation/minifying/minify_style_css.bat
Normal file
10
automation/minifying/minify_style_css.bat
Normal file
|
@ -0,0 +1,10 @@
|
|||
@echo on
|
||||
set LOCAL_DIR=%~dp0
|
||||
set LOCAL_DIR=%LOCAL_DIR:~0,-1%
|
||||
set "SOURCE=..\..\css"
|
||||
|
||||
echo Optimizing style.css to style.min.css
|
||||
cd %SOURCE%
|
||||
java -jar %LOCAL_DIR%\yuicompressor-2.4.8.jar style.css -o style.min.css
|
||||
|
||||
pause
|
BIN
automation/minifying/yuicompressor-2.4.8.jar
Normal file
BIN
automation/minifying/yuicompressor-2.4.8.jar
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue