-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added cssLoader to compress CSS on the fly.
library used - Minify. Can also compress JS
- Loading branch information
1 parent
0fd910c
commit 32f6d58
Showing
5 changed files
with
37 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
require ('resources/minify/src/Minify.php'); | ||
require ('resources/minify/src/CSS.php'); | ||
require ('resources/minify/src/JS.php'); | ||
require ('resources/minify/src/Exception.php'); | ||
require ('resources/path-converter/src/Converter.php'); | ||
// var_dump(get_declared_classes()); | ||
$minifier = new MatthiasMullie\Minify\CSS('assets/css/all.css'); | ||
|
||
// we can even add another file, they'll then be | ||
// joined in 1 output file | ||
|
||
// $sourcePath2 = '/path/to/second/source/css/file.css'; | ||
|
||
$minifier->add("assets/css/team.css"); | ||
$minifier->add("assets/css/style.css"); | ||
$minifier->add("assets/css/eventsmain.css"); | ||
$minifier->add("assets/css/intro.css"); | ||
$minifier->add("assets/css/jquery-ui.structure.min.css"); | ||
$minifier->add("assets/css/jquery-ui.min.css"); | ||
$minifier->add("assets/css/jquery-ui.theme.min.css"); | ||
|
||
// or we can just add plain CSS | ||
// $css = 'body { color: #000000; }'; | ||
// $minifier->add($css); | ||
|
||
// save minified file to disk | ||
// $minifiedPath = '/path/to/minified/css/file.css'; | ||
// $minifier->minify($minifiedPath); | ||
header("Content-type: text/css"); | ||
echo $minifier->minify(); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule minify
added at
cecee1
Submodule path-converter
added at
95c549
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters