symphonycms/symphony-2 — Issue #823: Assets minification 
Author: eKoeS
Created: 2011-10-10 20:26:09+00:00
State: open

On my [`minification`](https://github.com/eKoeS/symphony-2/tree/minification) branch I'm working on a mechanism (mostly borrowed from Symphony 3) to only have one file for all the CSS and one file for all the JS. This is what I've already achieved:

* All JS files are currently condensed into `admin-scripts.js` which is placed inside `manifest/cache`
* All CSS files are currently condensed into `admin-styles.css` which is placed inside `manifest/cache`
* A new setting is available called `minify_assets` that turns on/off the whole minification mechanism
* A new setting is available called `minified_assets_use_cache` that, if set to yes, uses the already existing minified files instead of recreating them on each refresh.

Please note that I had to exclude `manifest/cache` from the security rules in `.htaccess`, otherwise the server wouldn't be able to read the minified files. I'm more than happy to revert that if we find a better place for them!

The future plan is to develop a new delegate that allows developer to add more files from their extension directories to be minified.

(Moreover, it would be a good idea to develop an extension that, once the minification is completed, compress the files and serves them gzipped or simply without spaces, tabs, etc.)

Opinions/Advices?