This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-29
Channels
- # adventofcode (7)
- # announcements (11)
- # beginners (76)
- # boot (3)
- # calva (139)
- # cider (24)
- # clara (2)
- # cljdoc (11)
- # cljs-dev (90)
- # cljsjs (1)
- # cljsrn (3)
- # clojure (98)
- # clojure-austin (2)
- # clojure-brasil (2)
- # clojure-dev (16)
- # clojure-europe (3)
- # clojure-italy (55)
- # clojure-nl (37)
- # clojure-sweden (11)
- # clojure-uk (40)
- # clojurebridge (1)
- # clojurescript (107)
- # core-logic (10)
- # cursive (34)
- # data-science (9)
- # datascript (19)
- # datomic (48)
- # emacs (6)
- # figwheel (13)
- # figwheel-main (3)
- # fulcro (67)
- # jobs (1)
- # juxt (4)
- # lumo (8)
- # mount (1)
- # off-topic (29)
- # onyx (1)
- # reagent (7)
- # reitit (3)
- # ring-swagger (5)
- # shadow-cljs (39)
- # spacemacs (5)
- # tools-deps (1)
I needed a way for components to yell if they didn't have the data they needed to render properly so we could tell what parts of our application are down - I'm trying tap>
+ new relic's reporting
Someone has any idea about what i would need to do in order to make VSCode integration with Google Chrome debugger to work with clojurescript? Like, what would be necessary to do if i needed to do an extension to make it works, or where i can read more about this kind of stuff
What i want to do is to sync the breakpoints i set on VSCode with the breakpoints that chrome haves
because the integration is kinda already done, since i can step through the code when a breakpoint i set on chrome is triggered
There is any work done regarding the code navigation in Clojure/ClojureScript? When for example, i want to jump to the definition of a function and i press F12 on top of the symbol
@mateus.pimentel.w Have you tried cursive? It does this.
are you using calva? or any other clojure plugin? I vaguely remember something supporting that
hello guys
is this the right translation to this js code?
@abdullahibra it looks ok, #js {:authorization ... :container ...}
is a thing too
i have included dropin.min.js as {:file "resources/dropin.min.js" :provides ["braintree.dropin"]}
yeah i have them in project.clj in dev and prod env
then require braintree.dropin in the ns i use it
but i got error
@dnolen any suggestions ?
also i got the same with js/braintree too
look in the browser JS console to confirm that A) the library was loaded B) you can access braintree
should i include the js in the html page?
i have restarted figwheel
i got:
it's not a constructor so i should not add new
Those are methods? Or properties?
methods
https://developers.braintreepayments.com/start/hello-client/javascript/v3#get-a-client-token
Should methods should have the dash?
thanks @dnolen seems not loaded i have checked sources in browser
@abdullahibra so you're require is not working it seems
but {:file "resources/dropin.min.js" :provides ["braintree.dropin"]} is enough to make it loaded
i do this: (:require braintree.dropin)
will try [braintree.dropin]
@abdullahibra what is the rest of the ..
form? what is coming after -create
? maybe you are just calling it wrong?
that's a basic call
to make sure it will work then will add the actual code
is this referring to anything ?
(js/braintree.dropin.create
#js {:authorization ""
:container "#dropin-container"}
#())
(-> js/braintree
.-dropin
(.create #js {:authorization ""
:container "#dropin-container"}
#()))
(.. js/braintree
-dropin
(create #js {:authorization ""
:container "#dropin-container"}
#()))
that's great guys
everything works fine now
in particular, I'm having hella fun trying to get one of my namespaces loaded into the self-hosted part
this is on node. I'm trying to get a 'state' setup where I can run code in there that can invoke stuff in host's namespace. I'm getting confused in the process of figuring out how to get my namespace loaded into that state. I've done the 'load-analysis-cache!' bit, but that doesn't seem adequate to get my namespaces visible from inside that environment. So I'm missing something.
hrm I’m not really following - but there are definitely other people who have already gone down this road
yeah, sending me to read some of that is probably good advice. The non-code info is pretty spotty.
basically just trying setup whatever it would to take to go from (empty-state) -> (require <my namespace>) -> (eval state <some-code-using my-namespace>)
How to use :closure-defines
with deps.edn
?
{:deps {org.clojure/clojure {:mvn/version "1.9.0"}
org.clojure/clojurescript {:mvn/version "1.10.439"}
reagent {:mvn/version "0.8.1" :exclusions [cljsjs/react cljsjs/react-dom]}
form-validator {:local/root "../form-validator-cljs"}
;{github-kwladyka/form-validator {:git/url "" :sha ""}}
org.clojure/test.check {:mvn/version "0.9.0"}}
:paths ["src" "resources"]
:closure-defines {"goog.ATOM" "reagent"} ;; <<<<<<<
:aliases {:fig {:extra-deps
{com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}
com.bhauman/figwheel-main {:mvn/version "0.1.9"}}
:extra-paths ["target" "test"]}
:build {:main-opts ["-m" "figwheel.main" "-b" "dev" "-r"]}
:min {:main-opts ["-m" "figwheel.main" "-O" "advanced" "-bo" "dev"]}
:test {:main-opts ["-m" "figwheel.main" "-co" "test.cljs.edn" "-m" form-validator-demo.test-runner]}}}
:build {:main-opts ["-m" "figwheel.main" "-b" "dev" "-r" "-co" "{:closure-defines {my-lib.core/config 'different'}}}"]}
- so needs to be something like that?
What then with :test
. I am using file here. Can I use both?
What is the best way to use closure-defines with deps.edn?But what if I want to use always the same definition of value for all builds (aliases)? Do I have to set it for each one separately?
Hmm or maybe I can just set it in core.cljs as goog-define. Will be still best practice with deps.edn?
Generally my purpose is to set project (dependency module) to use atom
or reagent.core/atom
--- core.cljs
(goog-define goog.ATOM "reagent")
(println "AAA" (pr-str js/goog.ATOM))
Hmm why goog.ATOM is nil
?FWIW, this may be helpful once done: https://github.com/clojure/clojurescript-site/issues/268
ok so there is no other way to set for dependency module value. Only :closure-defines, doing this in core.cljs
is too late
:closure-defines
are basically compile time constants. so yeah only via build config
ok so back to my question https://clojurians.slack.com/archives/C03S1L9DN/p1543526392302500 - how can I set it for a whole project to not repeat it each time for each build (alias)?
You will need to use the Corfield comma when defining :main-opts
values that have spaces in them.
:build {:main-opts ["-m" "figwheel.main" "-b" "dev" "-r" "-co" "{:closure-defines,{my-lib.core/config,'different'}}}"]}
Othewise "{:closure-defines {my-lib.core/config 'different'}}}"
is pulled apart into 3 separate tokens
and with :test
I am using file for -co
so I have to move it to the file. It start to be a mess.
Sometimes you can factor out common compiler options into a reused set of compiler options placed in a file and then rely on the fact that when passing multiple compiler options, they get merged. But, unfortunately, it is a straight merge
, there is no fancy merge-with
logic to merge multiple :closure-defines
values.