CSS and Javascript Minification/Combination Upgrade to WebHelpers
Project description
Consider the MinificationWebHelpers as an extension to WebHelpers.
Basicly it adds two more options to the WebHelpers javascript_include_tag and stylesheet_link_tag functions:
minified: Minifies, ie, reduces as much as possible each of the files passed to it’s minimum size to reduce page load times.
combined: Joins all files passed into a single one to reduce server requests which in turn reduces page load times.
For an up-to-date read of the documentation, please read the documentation page on site.
Usage
On your own Pylons application, inside <app>/lib/helpers.py you add:
from minwebhelpers import *
Then, inside a template you could have:
<head> ${ h.javascript_include_tag('/js/file1.js', '/js/file2.js', minified=True, combined=True )} </head>
The above would mean file1.js and file2.js would be combined and then minimized.
Instalation
It’s as easy as:
sudo easy_install MinificationWebHelpers
Or if you wish to install current trunk:
sudo easy_install http://pastie.ufsoft.org/svn/sandbox/MinificationWebHelpers/trunk
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Hashes for MinificationWebHelpers-0.1.1.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | 070e523475b271f87bf75e536989a0fe120a0805d4ec981c6a3557b2fd9a5f84 |
|
MD5 | 8d853915d38efe7a1d2e226cff49157f |
|
BLAKE2b-256 | 40fa82ccc374362fb51b229ee04b7884f3803db2696b94e024e7fc09f863c51e |
Hashes for MinificationWebHelpers-0.1.1.tar.bz2
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1406fc892190ba23a02d7028be6c3f3efc39bed0a144dc1931a6147607ff7cf4 |
|
MD5 | 734c15a9c495a2f3b2b8dc1b3aa3a490 |
|
BLAKE2b-256 | 17bfafc277123ae79fdbe4da9449754987ab042c47309bc8b9411b79b745414a |