This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
Anybody have any wisdom on working with ring-anti-forgery from the ClojureScript side?
I’m just noodling here, but it seems you could get something working by making an authenticated GET against some endpoint that returns the anti-forgery token, which can then be put in a header for post requests
anybody using goog-define here? I defined a variable, but my :closure-defines
seemingly have no effect on it...
@venantius: that's how I've done it
@venantius: but if your index page is dynamic, you could put it in there?
@asolovyov: boot or lein?
@asolovyov: also which optimization mode?
I’m curious, what do people use Facebook’s css-layout for? https://github.com/facebook/css-layout
Does anyone know how I can parse a markdown file into a quiescent component? Preferably not parsing markdown in the browser.
@lukemorton: you can use a macro for this. Find some clojure or java markdown library and transform the markdown in the macro expansion. You could give the macro a filename and open it and transform it all in the macro
Thanks I'll look into clojurescript macros
Added a FAQ to the ClojureScript Wiki, feedback welcome: https://github.com/clojure/clojurescript/wiki/FAQ-%28for-JavaScript-developers%29
My first macro https://github.com/drpheltright/big-time.cljs/blob/master/src/big_time/markdown.clj
Thanks for the pointer @bhauman
@bbss thanks
@martinklepsch: lein, figwheel, optimizations :none
@asolovyov: try using a string key if you aren’t already
also there’s no quoting required in project.clj
@martinklepsch: I tried string key... and I'm running figwheel by hand (since composing lein plugins doesn't really work), so it's in project.clj
@asolovyov: grep in target for CLOSURE_UNCOMPILED_DEFINES
main.js
27:goog.global.CLOSURE_UNCOMPILED_DEFINES = {"mk.fe.vars.target":"nodejs","cljs.core._STAR_target_STAR_":"nodejs"};
but then in my vars.js:
mk.fe.vars.target;
/** @define {string} */
goog.define("mk.fe.vars.target","browser");
@asolovyov: difference between what?
can you show the vars namespace?
here is part of my compiler-options: :closure-defines {"mk.fe.vars.target" "nodejs"}
Not sure what’s going on here
gtg unfortunately, talk later!
def. weird 😜