Contao Open Source CMS > Enhance > Extension list > [js_minifier] Javascript minifier 1.0.0 rc1

Extensions > js_minifier

[js_minifier] Javascript minifier

A javascript minifier

JavascriptMinifier is an extension for typolight that automatically packs javascript filesfor you.

It uses the Nicolas Martin's PHP port of Dean Edwards JavaScript's Packer.

  • http://joliclic.free.fr/php/javascript-packer/en/
  • http://dean.edwards.name/packer/

All you have to do is to create the frontend module "Javascript Minifier", select thefiles you want to pack in the file tree and add the module in your page or layout. Istrongly recommande that you put it just before closing the body tag, for perfs sake.

If you're an extension developer, you can add files to be minified just like you use TL_JAVASCRIPT :

$GLOBALS[ 'TL_JAVASCRIPT_MIN' ][] = 'path/to/file.js';

Options

The module support two options :

  • Encode : Set on to use minifier. If not set, files will only be concatenated ( default : on )
  • Debug : Set on not to cache the resulting file. Useful for developers. ( default : off )

Assembling order

Files from $GLOBALS[ 'TL_JAVASCRIPT_MIN' ] are treated first, in the order they appear in the array.

Then, each file selected in the module configuration is included, in alphabetical order, so you can determine the inclusion order simply by prefixing files with numbers.

Version1.0.0 rc1TypeFree
Release date2010-01-13CategoryUtility
LicenseLGPL
Copyright© 2010, Olivier El Mekki
AuthorOlivier El Mekki (kik) http://olivier-elmekki.com
Release notes and change log for 1.0.0 rc1Other versions
initial commit1.0.0 stable
Release downloads5Total downloads16
Release installs4Total installs36
Release updatesTotal updates1
Dependencies of this extensionOther extensions depending on this one
NameVersion fromVersion to
Contao2.7.0 stable2.8.0 stable
NameVersion fromVersion to
PackageSizeDate
Contao_js_minifier_10000006_5.zip191232011-08-12 23:13