Return to main.


This is a wsgi middleware application intended for use with paste.deploy, zope.paste, and zope3.

It serves as a wsgi filter to "minimize" javascript for a zope3 application.

This can be slow. You probably do not want to run this in production unless you have (small) dynamically-generated scripts and css. But it can be useful for generating minimized javascript or css for resources. Those larger files can then be excluded from on-the-fly minimization.


for zope3, jsmin requires Sidnei da Silva's zope.paste

zope.paste is available at

    cd []/zope
    svn co paste

Instructions for zope.paste are at

zope.paste requires paste.deploy. paste.deploy can be obtained from the cheese shop. Presuming you have setuptools installed,

    sudo PasteDeploy

This (zif.jsmin) package can be unzipped and installed anywhere on the Python path.


Follow Sidnei's instructions for setting up zope.paste. It involves putting the usual zope.paste-configure.zcml file in [zope3 instance]/etc/site-packages. There is also a parameter to change in [zope3 instance]/etc/zope.conf. The new twist is a paste.ini file in [zope3 instance]/etc

An example paste.ini file looks like:

    pipeline = gzipper jsmin main

    paste.app_factory = zope.paste.application:zope_publisher_app_factory

    nocompress=jp gz zip

    compress_types=js css


The paste.ini file above shows examples of the configuration options for jsmin. Logo

Return to main.