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:
parent
7f07fbfd13
commit
abe1b70944
@ -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
|
||||
------------------------------
|
||||
|
||||
|
@ -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
|
||||
-----
|
||||
|
Loading…
Reference in New Issue
Block a user