You can (at least) control code execution for different builds using Closure 
Defines:
https://github.com/clojure/clojurescript/wiki/Compiler-Options#closure-defines

    (when js/goog.DEBUG
      (.log js/console "test"))

In my understanding this should also lead to the code being removed in advanced
compilation but I couldn't get that to happen. The setting-part seems to work 
fine
just the elimination isn't happening. I asked on the Closure mailing list:
https://groups.google.com/forum/#!topic/closure-compiler-discuss/uPk7hrHInBI

There's also goog.debug.Logger which most likely will allow you to do similar
stuff but I haven't looked into that much: 
http://docs.closure-library.googlecode.com/git/class_goog_debug_Logger.html

Cheers

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to