module providing a Minify features to a Jelix application.
This is a module for Jelix, providing Minify features for HTML response objects.
Minify is a library which allow to concatenate and minify CSS and JS files. It improves performance during the load of the page. This module provides plugins to integrate it into a Jelix application.
This module is for Jelix 1.7.x and higher. See the jelix/jelix repository to see its history before Jelix 1.7.
Install it by hands like any other Jelix modules, or use Composer if you installed Jelix 1.7+ with Composer.
In your project:
composer require "jelix/minify-module"
Launch the configurator for your application to enable and configure the module
php yourapp/cmd.php module:configure jminify
Then run the installer
You can use the module.
In the configuration file of the application, after the installation you should
have these parameters in the
[jResponseHtml] plugins = minify ;concatenate and minify CSS and/or JS files : minifyCSS = off # [on|off] : concatenate/minify CSS files minifyJS = off # [on|off] : concatenate/minify JS files ; list of filenames (no path) which shouldn't be minified - coma separated : minifyExcludeCSS = "file1.css,file2.css" minifyExcludeJS = "jelix/wymeditor/jquery.wymeditor.js" ; bootstrap file for Minify. indicate a relative path to the basePath. minifyEntryPoint = minify.php
minifyJS you activate the "minification". You
can indicate files to NOT minify in
minifyExcludeJS. Keep the file name
jelix/wymeditor/jquery.wymeditor.js (which is
bundled into Jelix) in
minifyExcludeJS. Wymeditor doesn't like to be concatenated with other files.
Indicated path should be
- relative to the base path of the application (without a leading /)
- or relative to the domain name (with a leading /)
Don't indicate full URL (with
http://...), they are automatically excluded.
The module install a copy a script
minify.php in your
If you want to choose an other name for this script, indicate its name into the
The module installer create also
app/config directory of your application. These are files
to set Minify native options. Read the documentation of Minify to know options.
Unit tests are in Testapp, in the jelix/jelix repository.