How to compress and minify CSS and JavaScript from the command line | Linux Today

How to compress and minify CSS and JavaScript from the command line

Written By
X
Xmodulo
Jan 3, 2014

The most well-known tool to minify CSS and JavaScript is YUI Compressor, which is part of YUI (Yahoo! User Interface) JavaScript library written by Yahoo! developers. The common use cases of YUI Compressor is in conjunction with other build tools such as Apache Ant or Maven, where web applications are built automatically minified with the help of YUI Compressor. YUI Compressor can also be used standalone to compress CSS/JavaScript files manually. In this tutorial, I will describe how to compress CSS or JavaScript from the command line on Linux by using YUI Compressor.

X

Xmodulo

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.