1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-21 21:30:08 +00:00

Remove logging to console from debug code

This commit is contained in:
Tim Düsterhus 2014-03-12 23:31:21 +01:00
parent 3997f674a4
commit 6fe073fd0c
2 changed files with 5 additions and 5 deletions

View File

@ -61,7 +61,7 @@
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);
passthru('uglifyjs '.escapeshellarg($jsFile).' --screw-ie8 -m -c --verbose --comments -d production=true -o '.escapeshellarg(substr($jsFile, 0, -3).'.min.js'), $code);
if ($code != 0) exit($code);
}
echo <<<EOT
@ -93,7 +93,7 @@
-----------------
EOT;
passthru('tar cvf ../file.tar --exclude=*coffee --exclude=*.scss --exclude=.sass-cache --exclude=node_modules -- *', $code);
passthru('tar cvf ../file.tar --exclude=*coffee -- *', $code);
if ($code != 0) exit($code);
echo <<<EOT

View File

@ -20,11 +20,11 @@ enabling EMCAScript 5 strict mode and overwriting console to prepend the name of
console =
log: (message) ->
window.console.log "[be.bastelstu.Chat] #{message}"
window.console.log "[be.bastelstu.Chat] #{message}" unless production?
warn: (message) ->
window.console.warn "[be.bastelstu.Chat] #{message}"
window.console.warn "[be.bastelstu.Chat] #{message}" unless production?
error: (message) ->
window.console.error "[be.bastelstu.Chat] #{message}"
window.console.error "[be.bastelstu.Chat] #{message}" unless production?
Continue with defining the needed variables. All variables are local to our closure and will be
exposed by a function if necessary.