JsCompress

Summary: javascript Compressor for recipes and skins
Version: 20110416
Prerequisites: pmwiki 2
Status: maintained
Maintainer: CarlosAB
Users: (view? / edit)
Discussion: JsCompress-Talk?

Questions answered by this recipe

How can I compress javascript files from recipes and skins with PmWiki?

It expects proper javascript inside javascript files, i.e. no errors.

Description

This enables the admin to compress javascript files from pmwiki using an action called jscompress.

Installation

Just Unzip the zip file and place it under the cookbook folder, then include the following lines in your config.php:

include_once('cookbook/csscompress.php');

or

include_once("$FarmD/cookbook/csscompress.php");

if you have a farm.

Configuration

Don't forget to fill the array called $JsCompressFiles, with the infiles and outfiles of your choice in pairs.

Usage

Access any page with the action 'action=jscompress', to see the files you filled in been compressed or giving understandable error messages.

Notes

This recipe uses an improved version of jsmin from the minify project.

Change log / Release notes

20110416Δ - first release.

See also

Contributors

CarlosAB

Comments

See discussion at JsCompress-Talk?

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.