javierfernandezbaz / minify

Automatically exported from code.google.com/p/minify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

using the built-in CSS & JS Compressors with Minify_HTML #286

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
So I'm trying to implement a filter for my html that will output minified HTML, 
using Minify's CSS & JS Compressors, but I'm running into issues with the CSS 
Compressor.

I'm using the following code

        require_once '/public/vendor/Minify/min/lib/Minify/HTML.php';
        require_once '/public/vendor/Minify/min/lib/Minify/CSS.php';
        require_once '/public/vendor/Minify/min/lib/JSMin.php';
        return \Minify_HTML::minify($output, array(
            'cssMinifier' => array('Minify_CSS', 'minify'),
            'jsMinifier' => array('JSMin', 'minify'),
        ));

However within the CSS.php is a require_once of 'Minify/CSS/Compressor.php', 
which fails as the base directory is different on my implementation.

Is there a recommend way to include files when trying to minify the html output 
also using Minify's CSS & JS minifier options?

Original issue reported on code.google.com by Zxur...@gmail.com on 4 Apr 2013 at 5:45

GoogleCodeExporter commented 8 years ago
I should clarify, while I know I can go through and change all of the paths 
within the Minifier library, I'm looking for a way to do it without modifying 
the original Minifier library.

Original comment by Zxur...@gmail.com on 4 Apr 2013 at 6:21

GoogleCodeExporter commented 8 years ago
Please use the google group for support. The master branch has all the latest 
updates, including autoloading, so there are no "require" statements in class 
files.

Original comment by mrclay....@gmail.com on 4 Apr 2013 at 2:40

GoogleCodeExporter commented 8 years ago
apologies. late when I typed it, thought I was in the groups section.

Original comment by Zxur...@gmail.com on 4 Apr 2013 at 4:14