Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

/var/sites/help-site.com/auto/tmp/CPAN/9677/Jifty-0.71129/lib/Jifty/Plugin/CompressedCSSandJS.pm

/var/sites/help-site.com/auto/tmp/CPAN/9677/Jifty-0.71129/lib/Jifty/Plugin/CompressedCSSandJS.pm


NAME

Jifty::Plugin::CompressedCSSandJS


SYNOPSIS

# In your jifty config.yml under the framework section:


  Plugins:

    - CompressedCSSandJS:

        js: 1

        css: 1

        jsmin: /path/to/jsmin

        cdn: 'http://yourcdn.for.static.prefix/'

        gzip: 1


DESCRIPTION

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.

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.

The gzip configuration directive, which defaults to enabled, instructs Jifty to transparently gzip css and js files as they're served if the client indicates it supports that feature.

init

Initializes the compression object. Takes a paramhash containing keys 'css' and 'js' which can be used to disable compression on files of that type.

js_enabled

Returns whether JS compression is enabled (which it is by default)

css_enabled

Returns whether CSS compression is enabled (which it is by default)

gzip_enabled

Returns whether gzipping is enabled (which it is by default)

generate_css

Checks if the compressed CSS is generated, and if it isn't, generates and caches it. (In devel mode, it always regenerates it)

_generate_javascript

Checks if the compressed JS is generated, and if it isn't, generates and caches it.

minify_js \$js

Runs the given JS through jsmin

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy