From 6fe073fd0c8cfc70f1b0e56320ca6e3062913d19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 12 Mar 2014 23:31:21 +0100 Subject: [PATCH] Remove logging to console from debug code --- contrib/build.php | 4 ++-- file/js/be.bastelstu.Chat.litcoffee | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/build.php b/contrib/build.php index 09ef26f..34cf5a7 100755 --- a/contrib/build.php +++ b/contrib/build.php @@ -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 << - 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.