Just a heads up for future readers (sorry for the noise to the rest):
In releases after 1.7.28 will be a `cljs.core/define` macro that makes a define
using `goog.define`.
Defines done with `goog.define` can be overridden at any compilation level.
Related JIRA ticket:
Thanks for elucidation. In my particular case, I was just trying to test that I
was using goog.DEBUG correctly from project.clj but in a dev mode which has
:none for optimizations. I missed docs that :closure-defines doesn't work in
that mode.
I've updated the wiki page to the effect that
http://dev.clojure.org/jira/browse/CLJS-1014
makes me think that defines should work in :none, not sure why they don't.
If you want to use Closure defines in :none while developing you can put them
into your HTML manually before including the javascript (or use shadow-build).
For standard CLJS
On Tuesday, May 5, 2015 at 11:02:15 AM UTC+10, Jamie Orchard-Hays wrote:
WRT wiki: looking at this commit, it looks like a keyword works:
https://github.com/clojure/clojurescript/commit/cb7e97f13ae6a03086f5d96ba58e5f3d5cba7dc3
(name key)
Jamie
On May 4, 2015, at 8:55 PM,
WRT wiki: looking at this commit, it looks like a keyword works:
https://github.com/clojure/clojurescript/commit/cb7e97f13ae6a03086f5d96ba58e5f3d5cba7dc3
(name key)
Jamie
On May 4, 2015, at 8:55 PM, Jamie Orchard-Hays jamie...@gmail.com wrote:
Aha! Thanks to you both, David and Thomas!
Can't figure out what I'm doing wrong here:
project.clj:
{:compiler
:closure-defines {:goog.DEBUG false}...}
But in my app, it evaluates true.
(println js/goog.DEBUG: ^boolean js/goog.DEBUG)
= true
org.clojure/clojurescript 0.0-3126
lein-cljsbuild 1.0.5
--
Note that posts from new
Should be goog.DEBUG not :goog.DEBUG.
David
On Mon, May 4, 2015 at 6:13 PM, Jamie Orchard-Hays jamie...@gmail.com
wrote:
Can't figure out what I'm doing wrong here:
project.clj:
{:compiler
:closure-defines {:goog.DEBUG false}...}
But in my app, it evaluates true.
(println
Cheers, David. Doubly confused now. The example at
https://github.com/clojure/clojurescript/wiki/Compiler-Options has the colon
prefix (:goog.DEBUG). In any case, removing the colon had no effect.
Jamie
On May 4, 2015, at 6:16 PM, David Nolen dnolen.li...@gmail.com wrote:
Should be
Fixed the wiki. :closure-defines currently only work under a compilation
mode, i.e. a higher setting than :none.
David
On Mon, May 4, 2015 at 6:40 PM, Jamie Orchard-Hays jamie...@gmail.com
wrote:
Cheers, David. Doubly confused now. The example at