Minify all html, css, js and optimize image files for web project.
- JavaScript compressor: UglifyJS
- CSS optimizer: CSSO
- HTML compressor/minifie: HTML compressor
- Optimize images: image_optim
Install NPM and compressor tools via the following script command.
$ git clone https://github.com/appleboy/minify-tool.git build
$ cd build && chmod +x install.sh minify
Install Html, CSS and JavaScript minify tool.
$ ./install.sh
Minify image files (include *.jpg, *.png, *.gif).
$ ./minify -t image image_folder_path
Minify single html, css or javascript file.
$ ./minify single_file_path
Minify web project on same folder.
$ ./minify your_project_folder_path
Minify web project to another folder.
$ ./minify your_project_folder_path -o output_folder_path
Copy minify to /usr/bin folder
$ cp ./minify /usr/bin/minify
Bo-Yi Wu, Twitter: @appleboy, Blog: http://blog.wu-boy.com