This project is read-only.

Configure Yui Compressor .NET

(see: http://yuicompressor.codeplex.com)

The configuration below directly maps to the configuration options provided by the underlying Yui Compressor .NET Minifiers. Xpedite does not implement any special logic around the base minifiers and any minification issues are that of the Yui Compressor .NET Minifier library.

To start using custom Xpedite configuration for Yui Compressor .NET Minifier:
  1. Complete initial Xpedite configuration (see: Configure Partially Xpedited Web Site).
  2. Register the Xpedite Yui Compressor .NET Minifier custom configuration section in the web site's web.config file.
  3. Confiure Yui Compressor .NET Minifier with the desired minifier options.

Completing Xpedite Configuration

Complete initial Xpedite configuration (see: Configure Partially Xpedited Web Site).

<xpedite mode="RemoteOnly">
  <css minifier="Xpedite.Minification.YuiCompressor.YuiCompressorCssMinifier, 
                 Xpedite.Minification.YuiCompressor, 
                 PublicKeyToken=a5fa8a719a542eb8" />
  <javascript minifier="Xpedite.Minification.YuiCompressor.YuiCompressorJavaScriptMinifier, 
                 Xpedite.Minification.YuiCompressor, 
                 PublicKeyToken=a5fa8a719a542eb8" />
</xpedite>

Registering the Xpedite Yui Compressor .NET Minifier custom configuration section

Within the <configuration> element of the web site's web.config file, add the following XML block to register the Xpedite custom configuration section.

<configuration>
  <!-- Other XML -->
  <configSections>
    <section name="xpedite.yuiCompressor" 
             type="Xpedite.Minification.YuiCompressor.Config.ConfigSectionHandler, 
                   Xpedite.Minification.YuiCompressor, PublicKeyToken=a5fa8a719a542eb8" 
             requirePermission="false"/>
  </configSections>
  <!-- Other XML -->
</configuration>

Once the custom configuration section has been registered in the web.config, the Xpedite Yui Compressor .NET Minifier configuration section may then be added.

CSS (Optional)
<configuration>
  <!-- Other XML -->
  <xpedite.yuiCompressor>
    <css columnWidth="0"
         compressionType="StockYuiCompressor"
      />
  </xpedite.yuiCompressor>
  <!-- Other XML -->
</configuration>

Note: Sample XML configuration illustrates the default configuration options used by the CSS Yui Compressor .NET Minifier.

JavaScript (Optional)
<configuration>
  <!-- Other XML -->
  <xpedite.yuiCompressor>
    <javascript isVerboseLogging="true"
                isObfuscateJavascript="true"
                preserveAllSemicolons="false"
                disableOptimizations="false"
                lineBreakPosition="-1"
                encoding=""
                threadCulture="en-GB"
                isEvalIgnored="false"
    />
  </xpedite.yuiCompressor>
  <!-- Other XML -->
</configuration>

Note: Sample XML configuration illustrates the default configuration options used by the JavaScript Yui Compressor .NET Minifier.

Last edited Jan 15, 2011 at 9:39 PM by CBaxter, version 5

Comments

No comments yet.