1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-10-31 14:10:08 +00:00

Compress JS on build

This commit is contained in:
Tim Düsterhus 2013-05-14 20:29:44 +02:00
parent 7f07fbfd13
commit abe1b70944
2 changed files with 17 additions and 6 deletions

View File

@ -47,6 +47,17 @@
}
echo <<<EOT
Compressing JavaScript
----------------------
EOT;
foreach (glob('file/js/*.js', GLOB_BRACE) as $jsFile) {
echo $jsFile."\n";
passthru('uglifyjs '.escapeshellarg($jsFile).' --screw-ie8 -m -c --verbose --comments -o '.escapeshellarg(substr($jsFile, 0, -3).'.min.js'), $code);
if ($code != 0) exit($code);
}
echo <<<EOT
Checking PHP for Syntax Errors
------------------------------

View File

@ -1,12 +1,12 @@
Main JavaScript file for Tims Chat
==================================
Copyright Information
---------------------
"@author Tim Düsterhus"
"@copyright 2010-2013 Tim Düsterhus"
"@license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>"
"@package be.bastelstu.chat"
### Copyright Information
# @author Tim Düsterhus
# @copyright 2010-2013 Tim Düsterhus
# @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
# @package be.bastelstu.chat
###
Setup
-----