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.2.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76f9ba2927a7e0acab698bb456d930dc4dfa88cb6c83d6fed57fd37af4a5635f |
|
MD5 | 48049097e1c61f072baf51b99aac7f38 |
|
BLAKE2b-256 | 1b3b29f8f518c837fd3cc6b2744d315739a6c5fc582c618a7939a2983f00fb72 |
Hashes for MinificationWebHelpers-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f97ee6f0cc655932615dc4fa7ca4f59b07d5e4901359751bf601af146804eacd |
|
MD5 | 32bf45d8b7aed00b16e310fa90cfbcc5 |
|
BLAKE2b-256 | 7da75a0cd778b6bccbb94b29a2913970c61f0aa36675b7ec3b3c8369ae8d67d8 |
Hashes for MinificationWebHelpers-0.1.2.tar.bz2
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb27aeff402d6c113cac4a7d53d0d8eeb2971dc7c011951c53abcadcb7bd5d98 |
|
MD5 | 568938b89dfe85ba4c62354b5ce6b5dc |
|
BLAKE2b-256 | d85f5d6d23f362261c3431b131e03dea10a730b16b3de6ccce9e715fd1105262 |