Experimental snippet - Minify CSS and JS and combine to single files

dbs

Hi Ruud, something like this is very welcome.  (Y)
Will test it in the next days.
[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

Ruud

A nice experimental snippet that will allow you to combine all CSS and Javascript (even external) into single files, combined and minified for high speed websites.
Warning: This module is meant for experienced users only, many issues are to be expected.

Short example:

Setup css
<?php
$css
[] = "css/bootstrap.min.css";
$css[] = "css/font-awesome.css";
$css[] = "css/custom.css";
$css[] = "css/fancybox/jquery.fancybox-1.3.4.css";
$css[] = 'https://fonts.googleapis.com/css?family=Roboto+Condensed:400,300,700';
?>

Create and output css
<?php minify_css(); ?>


Setup javascript
<?php
$js
[] = "https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";
$js[] = "js/bootstrap.min.js";
$js[] = "js/skrollr.min.js";
$js[] = "fancybox/jquery.fancybox-1.3.4.pack.js";
?>

Create and output javascript
<?php minify_js(); ?>

More info and download on: https://dev4me.com/modules-snippets/experimenteel/minify/
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]