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, Jamie Orchard-Hays <[email protected]> wrote:
>
> Aha! Thanks to you both, David and Thomas! :optimizations :none
>
>
> Jamie
>
>
>
> On May 4, 2015, at 6:48 PM, David Nolen <[email protected]> wrote:
>
> 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 <[email protected]> wrote:
>
> 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.
Our experiments on goog.DEBUG wrt to :optimizations setting showed the
following:
- `:none` - your project.clj setting is always ignored and defaults to `true`.
- `:whitespace` - same as :none…ignored.
- `:simple` - defaults to true. But recognises both {:goog.DEBUG false} and
{"goog.DEBUG" false} in project.clj
- `:advanced` - same as :simple
BTW, as far as I understand it, (WARNING UNTESTED) you can do your own
overrideable compile-time constants, by having a docstring on a def which
conforms to the correct Closure Compile form. See @define in
https://developers.google.com/closure/compiler/docs/js-for-compiler
;; in a namespace "example.ns"
;; the docstring is a very specific format
(def my-var "@define {boolean}" true)
Then in the project.clj you can add:
{:compiler
:closure-defines {:example.ns.my-var false}...}
But this will work the same way as goog.DEBUG. Ie. you can only override the
default value (true) for :simple and :advanced. For the other two, you'll get
true no matter what value you supply in project.clj.
(If David agrees on the correctness of these statements) should these notes be
added to some Wiki somewhere?
--
Mike
--
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.