Geeky Plugins

dotCMS JS & CSS Minifier

Minifying JavaScript and CSS files and reducing the number of HTTP requests is one of the most simple ways to speed up websites. After all: the fastest request is the request that way never made, and the smaller the file the faster it will be downloaded. This dotCMS plugin makes it easy to include these speed enhancements in your dotCMS web sites. The more CSS or JavaScript files you use on a page the bigger the performace gain will be.



How to use the plugin

Installing the plugin

To use it, you obviously first need to install the plugin. Here's how you do that:

  • Download the plugin using the download link above. If you're running an older version of dotCMS you can alternatively download one of the older versions of the plugin. In that case read the documentation that belongs to that older version and ignore the rest of this page.
  • Extract the zip that you downloaded to some folder on your system.
  • Navigate to the dotCMS Dynamic plugins page: "System" > "Dynamic Plugins"
  • Click on "Upload plugin" and select the .jar file located in the "target/" folder of the extracted zip file. So DO NOT upload the ZIP file itself, only the .jar file.
  • Click on "Exported Packages" and add these packages to the list (make sure to add a comma to the last package in the existing list):
    com.dotmarketing.osgi,
    com.dotmarketing.beans,
    com.dotmarketing.plugin.business,
    com.dotmarketing.portlets.fileassets.business,
    com.dotmarketing.portlets.languagesmanager.business,
    com.dotmarketing.portlets.languagesmanager.model,
    com.liferay.portal
    

That's it, you've installed the plugin. The plugin exposes two viewtools: $jsMinifyTool and $cssMinifyTool for working with JavaScript and CSS files respectively. In the API section you can find all the details, but you can also read along to get a more step by step explanation of all its features.

Minifying JavaScript - The basic case

Let's start with a simple case. Imagine you have two JavaScript files that are served from the current host and you'd like to minify and combine these into one call. Here's how that Would work.

## For JavaScript files replace the script tags such as these two below...

<script src="/path/to/file1.js"></script>
<script src="/some/other/path/to/file2.js"></script>

## ...with a call to the viewtool like this (you can also place all the files 
## on the same line, but using a line per file results in a more readable result):

$jsMinifyTool.toScriptTag("
  /path/to/file1.js
  ,/some/other/path/to/file2.js
")

## The viewtool will generate one new script tag that would look like this:

<script src="/path/to/67057579813.minifier.js?uris=/path/to/file1.js,/some/other/path/to/file2.js"></script>

So we call the .toScriptTag() viewtool method with a string containing all the paths to the JavaScript files divided by commas. These paths must be relative to the root of the current host. This will generate a single HTML script tag whose "src" attribute will point to a servlet which is part of the plugin. Remember that it does not actually exist as a file in the dotCMS file system, it's just a servlet. This servlet will return one file that contains all of the content of all files only minified. The order in which the files are combined will be preserved. These files are actually mappings to servlets and do not actually exist as files in the dotCMS file system.

The digits in the URL are a so called "cache busting" technique. They are calculated by the plugin based on the modification date of each of the files, so when one of the files changes the digits will also change which results in a new URL. This will force the browser to rerequest the URL and not use its own cache. So using this plugin will not only speed up yours website it will also fix the issue with changed JavaScript and CSS files not being requested by the browser. To learn more about how this URL is constructed take a look at the .toUrl() method in the API section on this page.

Minifying CSS - The basic case

The basic CSS case is almost identical to the JavaScript case. All HTML link tags need to be removed and replaced by one viewtool method call. For example, suppose we have the following HTML link tags:

## For CSS files replace the link tags such as these two below...

<link href="/path/to/file1.css" rel="stylesheet" />
<link href="/path/to/file2.css" rel="stylesheet" />

## ...with a call to the viewtool like this:

$cssMinifyTool.toLinkTag("
  /path/to/file1.css
  ,/path/to/file2.css
")

## The viewtool will generate one new link tag that would look like this:

<link href="/path/to/65203502484.minifier.css?uris=/path/to/file1.css,/path/to/file2.css" rel="stylesheet" />

Notice the use of the $cssMinifyTool instead of $jsMinifyTool for CSS files. Also notice that the paths of the two files are the same in this example. Combining CSS files that are located in different directories can cause problems because CSS files often contain references to image files relative to their own location. A typical example would be: "background: transparent img(img/sprite.png) -23px -560px no-repeat". As you can see in the example above the path for the resulting link tag is "/path/to/" which the plugin determined by looking at the path of the first file in the list.

Combining CSS and JS files from different VTL files

Sometimes the existing script or link tags are not all in the same VTL file. You could of course remove the script tag from all the VTL files and group them in one special file and include that on the page, but that would make it hard to create components such as widgets that are self contained. Every time you would want to create a new widget that needs some additional script or CSS file you would have to add that one special file instead of just adding it to the code field of the widget. Having a call to .toScriptTag() or .toLinkTag() per widget would result in multiple script or link tags which is what we want to prevent. To fix this the plugin enables you to add JavaScript and CSS files to a named group which you can then later reference. Here's an example: let's say that you want to create a carousel widget that uses JavaScript to handle all the client side behavior. Inside the code field of that widget you can add the JavaScript file to a group and name that group. Here's how you'd do that:

## Add the JavaScript file to a group with name "groupName"

$jsMinifyTool.addFiles("
  /path/to/jQuery.js
  ,/some/other/path/to/carouselFile.js
", "groupName")

## At the location that you would want to have the actual script tag (for instance the footer 
## container) you can use the group in the normal .toScriptTag() like this:

$jsMinifyTool.toScriptTag("
  groupName
  ,/path/to/other/File.js
")

## The viewtool will generate one new link tag that would look like this:

<script src="/path/to/93726399672.minifier.js?uris=/path/to/jQuery.js,/some/other/path/to/carouselFile.js,/path/to/other/File.js"></script>

A you can see above the viewtool simply replaces the groupName with all the files that were added to the group. If two calls to .addFiles() add the same file to the same group it will be included only the first time. You can add as many groups as you like and use them in any order in any .toScriptTag() call. The CSS case works the same but uses the $cssMinifyTool.addFiles() viewtool method instead.

Including files from other hosts

Sometimes you have a additional host that host shared files that you want to include in the minified call as well. You can do this by providing a host object to the .toScriptTag(), .toLinkTag() and .addFiles() methods. All files provided to the methods will be retrieved from the given host. For example:

## Add three files from three different hosts (current host, $someHost and $anotherHost)

$jsMinifyTool.addFiles("/path/to/file.js", "groupName")
$jsMinifyTool.addFiles("/some/path/to/a/file.js", "groupName", $someHost)
$jsMinifyTool.toScriptTag("/path/to/otherFile.js, groupName", $anotherHost)

## This will result in this script tag:

<script src="/path/to/25963026436.minifier.js?uris=//anotherHost/path/to/otherFile.js,/path/to/file.js,//someHost/some/path/to/a/file.js"></script>

Notice the order in which the viewtool adds the files to the servket call: the order in the .toScriptTag() call is leading. For security reasons you can only add files located on one of the hosts that are hosted on the same dotCMS server as the current host. Notice also that the methods expect a Host object and not a string, so to make it easy to retrieve the host the plugin provides a utility method: $jsMinifyTool.getHost("hostName or Alias"). The CSS case works the same but uses the $cssMinifyTool viewtool instead.

Adding inline JavaScript and CSS

Because we can now redefine the location in the page where scripts are inluded we also need a way to move the location where the inline scripts that use those files are included. Here's an example:

## For an inline script replace the script tags such as in this example below...

<script>
  $("#carousel").carousel({
    speed: 100,
    showControls: true,
    title: "Our products"
  });
</script>

## ...with a call to the viewtool like this:

$jsMinifyTool.addInlines("
  $('#carousel').carousel({
    speed: 100,
    showControls: true,
    title: 'Our products'
  });
", "groupName")

## At the location in the page where you'd like this inline script to be put do this:  

#foreach ($i in $jsMinifyTool.getInlines("groupName")
  $i
#end

Notice that in the inline script the double quotes have been replaced by single quotes. This needs to be done to not interfere with the opening and closing double quotes of the string that is the parameter of the .addInlines() method. Instead of just adding one group as the parameter to the .getInlines() call you can add multiple groups in the string, separated by commas. The CSS case works the same but uses the $cssMinifyTool viewtool instead.

The examples above cover most of the use cases that you'll most likely need. See the API section for all the details of these and some additional methods.


Tips and Tricks

Debugging minification problems

There are a couple of things you should know about debugging minification issues:

  • When you're developing a website and there's a bug in your CSS or JavaScript, you don't want to debug that issue using the minified version of the files. With the dotCMS minifier plugin you don't have to: when you add the parameter debug=true in the page url, the minify viewtool will generate the normal tags for you, which return the unminified files. For instance:
    http://mysite.com/home/index.html?debug=true
  • If dotCMS encounters an error while minifying it will skip the file and include the unminified version instead. You can check the dotcms.log log file to see what went wrong.
  • If one of the files cannot be found the viewools will throw an error in the HTML. So check the HTML file if your page does not seem to work correctly.

Limitations

There are currently two known limitations

  1. @import isn't minified
  2. URLs in minified files can break

There is no solution for the first limitation so far. However the usage of @import won't break your CSS, it will just not minify and combine the referenced @import files. So it is safe to use on your pages. Using @import to include CSS on your page has other issues that are unrelated to this plugin or even dotCMS, so try to prevent it.

There are two possible solutions for the second limitation. Let's first explain the problem further. When you return all the CSS from one file, that means that all relative URLs are determined by looking at that single file. This is no problem when all your CSS files are in the same directory, it becomes a problem when that isn't the case. Say we have two css files /css/style.css which refers to img/style.jpg, and /extra/extra.css which refers to img/extra.jpg. When both files are minified and returned from /css/7876862326.minifier.css, the img/extra.jpg can't be found (because it's at /extra/img/extra.jpg and not /css/img/extra.jpg). This is a problem.

To solve this you can do three things:

  • Use URLs relative to the root, so /css/img/style.jpg and /extra/img/extra.jpg
  • Put your CSS in the same directory, since the minifier.css is called from the directory of the first URI in the viewtool.
  • Use a .toLinkTag() per directory. This will increase the number of calls but the CSS will still be minified.

About the minification process

Files that have the string ".min" in their filename will not be minified. The plugins assumes that these files have already been minified. For minifying JavaScript files the plugin uses the Google closure compiler, for minifying CSS files YUI Compressor is used. In both cases only newlines, comments and unneccessary whitespace is removed. We have found that these settings causes the least minification issues.

DotCMS cache

The plugin does not minify a file each time it is called, but stores the minified result in the existing dotCMS cache. By using this dotCMS cache, you have control over the minified files. When you want to remove the cached minified files, just flush the dotCMS cache and you're done. The cache will be re-filled on-the-fly. When you change the file through the admin interface or through WEBDAV this cache will be automatically flushed.


API

Below are all the public calls that this plugin provides. Most of the calls exist for both the $jsMinifyTool and the $cssMinifyTool viewtools. Use the correct viewtool when working with JavaScript and CSS code because adding JavaScript files using the $cssMinifyool and vice versa will not work.

$jsMinifyTool.toScriptTag()

Returns one HTML script tag that links to the minify servlet that will combine and minify the JS files in "filesOrGroups". The URL used for the src attribute is constructed using the toUrl(String, String, Host) method. Also see that method for how the "domain" and "host" parameters are used.

If in debug mode however it returns a set of script tags (one for each referenced JS file in "fileOrGroups") that directly links to the given JS file. In this case nothing will be minified or combined. We are in debug mode if the URL that was used to do this request has a parameter with the name "debug". It's value does not matter.

Important to know is that all relative references inside of the files (such as references to other JS files from within one of the JS files) will be relative from the location of the first file in "filesOrGroups". So do not mix files that are located in different folders.

This method comes has a few alternative signatures as you can see below. They all do the same thing, but the shorter ones use defaults for some of the attributes for convience.

Signature

.toScriptTag(filesOrGroups, domain, host, cookieOptInLevel)
filesOrGroups Type: String

A comma separated list of file paths, or groups.

domain Type: String

The domain that should be used as the domain for the minifier URL. If no domain is provided the URL will be made relative. Setting this does not mean that the files in filesOrGroups will be retrieved from that server and minified, it just means that the domain of the generated Minify URL will point to that server. (For security reasons the Minifier does not load and minify files that are not located on one of the hosts of this dotCMS instance.). Setting this parameter is useful for things like using CDNs to host your content. Use null or "" to skip this parameter.

host Type: com.dotmarketing.beans.Host

The host where the given files can be found. Use null to skip this parameter.

cookieOptInLevel Type: String

the cookie acceptance level that these JS files require to run. Use null or "" to skip this parameter.

.toScriptTag(filesOrGroups)

Does the same as .toScriptTag(filesOrGroups, domain, host, cookieOptInLevel), but with domain, host and cookieOptInLevel defaulted to null.

.toScriptTag(filesOrGroups, domain)

Does the same as .toScriptTag(filesOrGroups, domain, host, cookieOptInLevel), but with host and cookieOptInLevel defaulted to null.

.toScriptTag(filesOrGroups, host)

Does the same as .toScriptTag(filesOrGroups, domain, host, cookieOptInLevel), but with domain and cookieOptInLevel defaulted to null.

$cssMinifyTool.toLinkTag()

Returns one HTML <link> tag that links to the minify servlet that will combine and minify the CSS files in "filesOrGroups". The URL used for the href attribute is constructed using the toUrl(String, String, Host) method. Also see that method for how the "domain" and "host" parameters are used.

If in debug mode: a set of link tags (one for each referenced CSS file in "fileOrGroups") that directly links to the given CSS file. In this case nothing will be minified or combined. We are in debug mode if the URL that was used to do this request has a parameter with the name "debug". It's value does not matter.

If "extraAttributes" is provided its value will be included inside the <link> tags. This can be handy in the case of additional information such as "media=print".

Important to know is that all relative references inside of the files (such as references to images inside a CSS file) will be relative from the location of the first file in "filesOrGroups". So do not mix files that are located in different folders.

This method comes has a few alternative signatures as you can see below. They all do the same thing, but the shorter ones use defaults for some of the attributes for convience.

Signature

.toLinkTag(filesOrGroups, domain, host, extraAttributes)
filesOrGroups Type: String

A comma separated list of file paths, or groups.

domain Type: String

The domain that should be used as the domain for the minifier URL. If no domain is provided the URL will be made relative. Setting this does not mean that the files in filesOrGroups will be retrieved from that server and minified, it just means that the domain of the generated Minify URL will point to that server. (For security reasons the Minifier does not load and minify files that are not located on one of the hosts of this dotCMS instance.). Setting this parameter is useful for things like using CDNs to host your content. Use null or "" to skip this parameter.

host Type: com.dotmarketing.beans.Host

The host where the given files can be found. Use null to skip this parameter.

extraAttributes Type: String

A string containing additional attributes that need to be added to the <link> tags, such as "media=print". Use null or "" to skip this parameter.

.toLinkTag(filesOrGroups)

Does the same as .toLinkTag(filesOrGroups, domain, host, extraAttributes), but with domain, host and extraAttributes defaulted to null.

.toLinkTag(filesOrGroups, domain)

Does the same as .toLinkTag(filesOrGroups, domain, host, extraAttributes), but with host and extraAttributes defaulted to null.

.toLinkTag(filesOrGroups, host)

Does the same as .toLinkTag(filesOrGroups, domain, host, extraAttributes), but with domain and extraAttributes defaulted to null.

$jsMinifyTool.toUrl()   &   $cssMinifyTool.toUrl()

Returns The URL that can be called by the browser that will return a minified and combined version of the content of the files (and the files in the groups) in "filesOrGroups". The URL that is returned consists out of these parts:

[domain]/[path]/[cache buster][FILTER_PATTERN][extension]?uris=[uris][debug mode]

    1. [domain]
      If the parameter "domain" is provided, [domain] will be constructed as a protocol relative domain: "//[the value of the provided domain]". If not, the [domain] part will be "/" making the URL relative to the root of the website.
    2. [path]
      The path will be constructed by taking the path of the first file in "filesOrGroups" and stripping away the file part. This means that all other files in "filesOrGroups" will have to be written in such as way that references to other resources from the content of those files are relative to that same path. For instance all references to background images in CSS files must be relative to the same path, or else they won't be found.
    3. [cache buster]
      This is the result of an Adler32 checksum of all the modification dates of all the files included in filesOrGroups. If one of the files changes its modification date, this checksum will also change, resulting in a different URL, forcing the browser to reload. We do not use a http query parameter for this because some proxies don't included them in their cache key.
    4. [FILTER_PATTERN]
      The value of "FILTER_PATTERN" as defined in this class. It is used by the Minify filter to recognize which requests the Minify frameworks needs to handle. So never use this pattern in any of your own .css or .js files because the minifier will handle it as a minifier servlet
    5. [extension]
      The extension of the type of files that are being minified, e.g. css or js.
    6. [uris]
      The list of all files in "filesOrGroups"separated by commas. The groups are of course translated to the files that contains them.
    7. [debug mode]
      If in debug mode [debug mode] will be "&debug=true", otherwise it is empty. Requesting the URL the server will respond with the original version of the files in [uris], not the minified versions. The files will still be combined into one big file by the server, just not minified. We are in debug mode if the URL that was used to do this request has a parameter with the name "debug", so the value of that parameter does not really matter.

This method comes has a few alternative signatures as you can see below. They all do the same thing, but the shorter ones use defaults for some of the attributes for convience.

Signature

.toUrl(filesOrGroups, domain, host)
filesOrGroups Type: String

A comma separated list of file paths, or groups.

domain Type: String

The domain that should be used as the domain for the minifier URL. If no domain is provided the URL will be made relative. Setting this does not mean that the files in filesOrGroups will be retrieved from that server and minified, it just means that the domain of the generated Minify URL will point to that server. (For security reasons the Minifier does not load and minify files that are not located on one of the hosts of this dotCMS instance.). Setting this parameter is useful for things like using CDNs to host your content. Use null or "" to skip this parameter.

host Type: com.dotmarketing.beans.Host

The host where the given files can be found. Use null to skip this parameter.

.toUrl(filesOrGroups)

Does the same as .toUrl(filesOrGroups, domain, host), but with domain and host defaulted to null.

.toUrl(filesOrGroups, domain)

Does the same as .toUrl(filesOrGroups, domain, host) but with host defaulted to null.

.toUrl(filesOrGroups, host)

Does the same as .toUrl(filesOrGroups, domain, host), but with domain defaulted to null.

$jsMinifyTool.reset()   &   $cssMinifyTool.reset()

Removes all files and inline code that have been added so far.

$jsMinifyTool.addFiles()   &   $cssMinifyTool.addFiles()

Adds the given uris to the given group using the given dotCMS host as the host the uris should be looked up.

Signature

.addFiles(fileUris, group, host)
fileUris Type: String

The fileUris to add, separated by a comma. For instance: "/path/to/file.js,/path/to/another/file.js".

group Type: String

The group to add the file to.

host Type: com.dotmarketing.beans.Host

The dotCMS host that will be used to retrieve the filesUris. If no host is provided the current host is used. Use null to skip this parameter.

.addFiles(fileUris, group)

Does the same as .addFiles(fileUris, group, host), but with host defaulted to null.

$jsMinifyTool.getFiles()   &   $cssMinifyTool.getFiles()

Return a set of FileAsset objects that were added to any of the given groups.

Signature

.getFiles(groups)
groups Type: String

The groups to get the files from separated by commas.

$jsMinifyTool.getFileGroups()   &   $cssMinifyTool.getFileGroups()

Return a Set of all created groups used for storing fileUris.

$jsMinifyTool.addInlines()   &   $cssMinifyTool.addInlines()

Adds inline code to the given group.

Signature

.addInlines(inlineCode, group)
inlineCode Type: String

The inline code to add.

group Type: String

The group to add the inline code to.

$jsMinifyTool.getInlines()   &   $cssMinifyTool.getInlines()

Returns a Set of all inline code that was added to the given group.

Signature

.getInlines(groups)
groups Type: String

The groups to get the inline code from, separated by commas.

$jsMinifyTool.getInlineGroups()   &   $cssMinifyTool.getInlineGroups()

Returns a Set of all created groups for storing inline code.

$jsMinifyTool.getHost()   &   $cssMinifyTool.getHost()

Returns the host or the alias that has the given string as its hostName or Alias. This is a convience method to be used for all methods that take a Host object as their parameter.

Signature

.getHost(hostNameOrAlias)
hostNameOrAlias Type: String

The name or the alias of one of the hosts on this dotCMS server


Previous versions

Here you can download older versions of this plugin. This might be handy if the dotCMS version that you run is too old to run the latest version of the plugin. Select the dotCMS version that you need to be compatible with form the list below. Pick the most recent released plugin from the results. If you already use an older version of the plugin and want to upgrade then make sure that you pick a version whos plugin API is compatible with your current API version, or be ready to upgrade your existing code.

None of the plugins are compatible with this dotCMS version.
v2.5-1 dotCMS 2.5 - 2.5.1 API v2 dynamic plugin Oct. 28, 2013
  • This is the first version of this plugin that used the dotcms dynamic (OSGi) plugin architecture.
  • Changed the API. This plugin is no longer compatible with the older static versions!
  • Rewrote the entire documentation.
  • Builds with maven. When you plan on changing the source code and you want to use maven you will need to change the pom.xml to work with your own repository. We plan to change this in a future version.
download documentation
v2.1-5 dotCMS 2.0 - 2.5.1 API v1 static plugin Dec. 27, 2012
  • Added a dynamic cachebuster variable to the end of the generated script url. This will make sure that the browser re-requests the file(s) after changes have been made to it.
download documentation
v2.1-4 dotCMS 2.0 - 2.1 API v1 static plugin Oct. 15, 2012
  • Newline characters in the macro will now be removed from the generated script url.
download documentation
v2.1-3 dotCMS 2.0 - 2.1 API v1 static plugin Sep. 24, 2012
  • Changed response headers to allow browser caching.
download documentation
v2.1-2 dotCMS 2.0 - 2.1 API v1 static plugin Sep. 12, 2012
  • Updated code for dotCMS 2.1.
  • The cache is now automatically updated when you change/upload a CSS or JS file. This was no longer working in dotCMS 1.9.
download documentation
v2.1-1 dotCMS 2.0 - 2.1 API v1 static plugin Sep. 12, 2012
  • Updated code for dotCMS 2.1.
  • The cache is now automatically updated when you change/upload a CSS or JS file. This was no longer working in dotCMS 1.9.
download documentation
v1.9-9 dotCMS 1.9.5 - 1.9.5.1 API v1 static plugin Dec. 27, 2012
  • Added a dynamic cachebuster variable to the end of the generated script url. This will make sure that the browser re-requests the file(s) after changes have been made to it.
download documentation
v1.9-8 dotCMS 1.9.5 - 1.9.5.1 API v1 static plugin Oct. 15, 2012
  • Newline characters in the macro will now be removed from the generated script url.
download documentation
v1.9-7 dotCMS 1.9.5 - 1.9.5.1 API v1 static plugin Sep. 24, 2012
  • Changed response headers to allow browser caching.
download documentation
v1.9-6 dotCMS 1.9.5 - 1.9.5.1 API v1 static plugin Jun. 5, 2012
  • Made compatible with dotCMS version 1.9.5.
  • Minor bugfixes.
download documentation
v1.9-5 dotCMS 1.9.3.1 - 1.9.5 API v1 static plugin Oct. 3, 2011
  • Made compatible with dotCMS version 1.9.3.2.
  • Will no longer crash when files are corrupt.
  • Removed minification of all files at server startup. All files are minified lazily.
  • Is not backwards compatible with previous dotCMS versions! Make sure to download the correct version of this plugin.
download documentation
v1.9-4 dotCMS 1.9.3.1 - 1.9.3.2 API v1 static plugin Aug. 22, 2011
  • Made compatible with dotCMS version 1.9.3.1.
download documentation
v1.9-3 dotCMS 1.9.2 - 1.9.5.1 API v1 static plugin Apr. 13, 2011
  • Made compatible with dotCMS version 1.9.2.
download documentation
v1.9-2 dotCMS 1.9.1.4 - 1.9.2 API v1 static plugin Mar. 10, 2011
  • Made compatible with dotCMS version 1.9.1.4.
download documentation
v1.9-1 dotCMS 1.9 - 1.9.1.4 API v1 static plugin Mar 9, 2011
  • First release.
download documentation
v1.7-1 dotCMS 1.7 API v1 static plugin Mar. 9, 2011
  • First version.
download documentation
Comments
Leave a comment »
  • Serkan Karaarslan 17-01-2012 - 22:30

    It's a nice solution and definitely worth it. It's crucial to reduce the size of javascript and css files, especially it's for mobile web applications. I've build this kind of solutions for .net web application. All javascript files are minified automatically and stored into folder called packed when you build your application. If you like you can check my solutions. It's simple but beneficial. http://code.technolatte.net/MinifyJavascriptFiles/

  • Angelo 06-03-2012 - 19:03

    Unfortunately, I wasn't able to make it work in my scenario: I have all CSS and JS files deployed through plugins, not uploaded directly to the dotCMS instance. Is there a way to use your plugin in this situation..? Thanks.

  • Xander 07-03-2012 - 08:38

    It's possible, but not right now. The minifier uses a FileInputStream to minify the files, so only the retrieving (and caching) of the files need to be implemented.

Leave a comment