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.