-
Notifications
You must be signed in to change notification settings - Fork 937
Resources optimizations
You can optimize images by running all_image_optimization.bat from \automation\images\
folder
all_image_optimization.bat -d -jtran -pout -pquant -optip -gsicle -svgo
Parameters:
-
-d - default path to images' folder (you can pass your own path:
all_image_optimization.bat D:\development\web\devfest-14\images -jtran
) Required! - -jtran - optimize JPEG images (suggested by Web Fundamentals)
- -pout - lossless PNG optimization
- -optip - lossless PNG optimization (suggested by Web Fundamentals)
- -pquant - lossy PNG optimization (suggested by Web Fundamentals)
- -gsicle - create and optimize GIF images (suggested by Web Fundamentals)
- -svgo - Nodejs-based tool for optimizing SVG vector graphics files (suggested by Web Fundamentals) (Nodejs required)
For -svgo
intall Nodejs and then run command
[sudo] npm install -g svgo
You can use some of parameters. For example
all_image_optimization.bat -d -jtran -optip
Moreover, you can run the files separately jpegtran.bat, pngout.bat, optipng.bat, pngquant.bat, gifsicle.bat or svgo.bat which by default will optimize all images in /img/
folder and subfolder or pass a path to the folder.
jpegtran.bat
Or
jpegtran.bat D:\development\web\devfest-14\images
You can optimize all .css
and .js
files in /css/
and /js/
folders by running minify_all.bat from \automation\minifying\
folder
minify_all.bat
Specify pathes to .css
and .js
folders through parameters
minify_all.bat path_to_css_folder path_to_js_folder
For example
minify_all.bat D:\development\web\devfest-14\styles D:\development\web\devfest-14\scripts
Note! path to css folder should be first For sure, you can run the files separately minify_css.bat or minify_js.bat You can use some of them. For example
minify_css.bat
Or
minify_css.bat D:\development\web\devfest-14\styles
Also you can generate .min
files only of main.css and scripts.js
minify_main_css.bat
minify_scripts_js.bat
© 2014 Oleh Zasadnyy, Vitaliy Zasadnyy · GDG Lviv