ePages 6.17.12 - DE_EPAGES/Presentation/API/YUICompressor.pm

Package DE_EPAGES::Presentation::API::YUICompressor

This module provides an API for the Yahoo UI Compressor.

@EXPORT_OK
MinifyCSS
MinifyJavaScript
GetYUIJar

Functions

GetYUIJar
MinifyCSS
MinifyJavaScript

GetYUIJar

Returns the full file path to the YUI compressor jar.

Syntax
my $CompilerJar = GetYUIJar();
Return
$Jar (string)
full file path to YUI compressor jar

MinifyCSS

Minifies the CSS code in the given source file and writes the minfied content to the target file.

Syntax
MinifyCSS($SourceFilePath, $TargetFilePath);
Input
$SourceFilePath (string)
CSS source (full file path and name)
$TargetFilePath (string)
target for output (full file path and name)

MinifyJavaScript

Minifies the javascript source code in the given source file and writes the minfied content to the target file. It is very likely to better use the google closure compiler to get smaller minified files.

Syntax
MinifyJavaScript($SourceFilePath, $TargetFilePath);
Input
$SourceFilePath (string)
javascript source (full file path and name)
$TargetFilePath (string)
target for output (full file path and name)