Seeking guidance on how to compress all CSS into a single line. Currently using the bwp-minify WordPress plugin, but looking to increase compression levels by modifying the YUICompressor.php file.
Attempted adjusting the line-break parameter to 0 and 100000 without any success.
Is it as follows?
--line-break
Some source control tools may not support files with lines longer than a certain threshold, such as 8000 characters. The linebreak option is used in such cases to split long lines after a specific column, making the code more readable and easier to debug. Specify 0 for a line break after each semicolon in JavaScript, and after each rule in CSS.
Source Code:
<?php
/**
* Class Minify_YUICompressor
* @package Minify
*/
/**
* Compress Javascript/CSS using the YUI Compressor
*
* You must set $jarFile and $tempDir before calling the minify functions.
* Also, depending on your shell's environment, you may need to specify
* the full path to java in $javaExecutable or use putenv() to setup
* the Java environment.
*
* <code>
* Minify_YUICompressor::$jarFile = '/path/to/yuicompressor-2.3.5.jar';
* Minify_YUICompressor::$tempDir = '/tmp';
* $code = Minify_YUICompressor::minifyJs(
* $code
* ,array('nomunge' => true, 'line-break' => 1000)
* );
* </code>
*
* @todo unit tests, $options docs
*
* @package Minify
* @author Stephen Clay <<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4e3d3a2b382b0e233c2d222f3760213c29">[email protected]</a>>
*/
class Minify_YUICompressor {
/**
* Filepath of the YUI Compressor jar file. This must be set before
* calling minifyJs() or minifyCss().
*
* @var string
*/
public static $jarFile = null;
/**
* Writable temp directory. This must be set before calling minifyJs()
* or minifyCss().
*
... (the rest of the content continues)