Jifty::Plugin::CompressedCSSandJS
# In your jifty config.yml under the framework section:
Plugins: - CompressedCSSandJS: js: 1 css: 1 jsmin: /path/to/jsmin
This plugin provides auto-compilation and on-wire compression of your application's CSS and Javascript. It is enabled by default, unless your ConfigFileVersion is greater or equal than 2.
ConfigFileVersion
It also supports js minifier, you will need to specify the full path. The jsmin can be obtained from http://www.crockford.com/javascript/jsmin.html.
Note that you will need to use ConfigFileVersion 2 to be able to configure jsmin feature.
Initializes the compression object. Takes a paramhash containing keys 'css' and 'js' which can be used to disable compression on files of that type.
Returns whether JS compression is enabled (which it is by default)
Returns whether CSS compression is enabled (which it is by default)
Checks if the compressed JS is generated, and if it isn't, generates and caches it.
Runs the given JS through jsmin
To install Jifty, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Jifty
CPAN shell
perl -MCPAN -e shell install Jifty
For more information on module installation, please visit the detailed CPAN module installation guide.