Skip to content

lightweight yuicompressor docker image for command line minification of js and css files

License

Notifications You must be signed in to change notification settings

nullmem/yuicompressor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YUI Compressor

The YUI Compressor is a CSS & Javascript compression and minification tool based on Java. Official documentation can be found here. There might be many reasons why you would run Java inside a container instead of installing it directly on your machine. This image is based on the popular Alpine Linux project and contains the bare minimum JRE components required to run the YUI Compressor from OpenJDK and weighs in at only ~83MB.

How to use this image

docker run -it -v ${PWD}:/yui --rm nullmem/yuicompressor input.js -o output.min.js

You can also create a shell alias

alias yuicompressor="docker run -it -v \${PWD}:/yui --rm nullmem/yuicompressor"

Recursive batch compression

You can also recursively compress all CSS & Javascript files in the current directory and all its subdirectories. This script will ignore all currently minimized files ( *.min.css | *.min.js ) and will overwrite them with the latest minimized version automatically.

docker run -v ${PWD}:/yui -it --rm --entrypoint /bin/batch-compress.sh nullmem/yuicompressor

About

lightweight yuicompressor docker image for command line minification of js and css files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published