This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
@dnolen: uncompiled defines only work when the define is done with goog/define
@dnolen: I’ll open a ticket in a bit and put in what I’ve learned
@martinklepsch: sounds good
@dnolen: http://dev.clojure.org/jira/browse/CLJS-1389 — is there an edit button for the description in JIRA?
Experimenting with a macro but somehow the compiled JS ends up containing hello_world.core.js_STAR_.call
instead of what the compiler would usually emit.
(defmacro define
[sym default]
(let [defname (-> (str *ns* "." (name (symbol sym)))
(clojure.string/replace "-" "_"))
goog-define (str "/** @define {boolean} */"
"goog.define('" defname "', " default")")]
`(do
(declare ~(symbol sym))
(js* ~goog-define))))
I literally didn’t write any macros before I think 👻
I was looking though the open backlog and ran into http://dev.clojure.org/jira/browse/CLJS-338 which seems like it should be closed? Does not seem to be an issue anymore