This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-02
Channels
- # aleph (1)
- # architecture (4)
- # beginners (39)
- # boot (12)
- # cider (25)
- # cljs-dev (3)
- # cljsrn (5)
- # clojure (175)
- # clojure-dusseldorf (1)
- # clojure-italy (13)
- # clojure-nl (4)
- # clojure-russia (1)
- # clojure-spec (52)
- # clojure-uk (110)
- # clojurescript (35)
- # data-science (2)
- # datomic (61)
- # editors (8)
- # emacs (2)
- # fulcro (7)
- # graphql (15)
- # hoplon (1)
- # hyperfiddle (3)
- # jobs (4)
- # jobs-discuss (12)
- # juxt (2)
- # lein-figwheel (6)
- # leiningen (35)
- # off-topic (4)
- # onyx (5)
- # parinfer (1)
- # pedestal (63)
- # re-frame (38)
- # reitit (7)
- # ring-swagger (7)
- # rum (2)
- # shadow-cljs (27)
- # tools-deps (10)
- # uncomplicate (16)
Apologies for the lazy question 🙂. I have seen a hand full of ways to deploy apps and can think of some myself, but in your opinion, if your doing a clojurescript only (re-pose in my case) app then whats the easiest way to get on the web?
im fiddling with heroku right now. i’m having to learn a couple bits about the ecosystem that i have been ignoring.
No need to fill in all the details, i’m just curious what current wisdom is for a quick server-less app would be.
@drewverlee For serverless, I use Surge.sh and Netlify, and am quite happy with both.
Thanks! I saw another recommendation for netify, I'll give it a go
coolness surge is super easy for pure js and html stuff which is what i want to play with for a bit 🙂
Yeppers!
I used to use Heroku for that, but it's way slower to work with than Surge (which seems great for quick/small things), and more costly than Netlify (which seems great for slightly more serious/medium-sized things)
I'm wondering if anyone can point out what I'm doing wrong with #om-next :- according to the docs for the parser's mutate function (https://github.com/omcljs/om/wiki/Documentation-(om.next)#parser), if the return map from my mutate function includes a :value {:keys [:todos/list]} then any components with :todos/list in their IQuery should be re-rendered. I cannot get it to work though. As soon as I add :todos/list to the end of my transact! transaction though, everything works. Am I misunderstanding what adding :value {:keys [:todo/list]} to my mutate function is meant to do? Is it not meant to be the same as adding it to the end of a transact! call?
If there are both clj
and cljs
files for same ns, where clj
contains a macro and cljs
contains a function of the same name as the macro, which one will be chosen when compiling ClojureScript and requiring with [my.ns :as my]
?
(it looks like I’m getting a macro, but wanted a function defined in cljs
ns)
@roman01la if the clj
ns is loaded the macro is used. typically that should only be the case if the CLJS self-required but that doesn't work reliably in CLJS. see https://dev.clojure.org/jira/browse/CLJS-2454
So this shouldn’t happen normally, right? (I don’t have self-requires btw)
Not sure how to debug why clj
is getting loaded. In works fine in REPL though (clj and cljs repls)
ok, I know why is it loaded 🙂
but now this means that to make it work with both macro and a function of the same name I have to move everything into cljc
, but since there’s a lot of interop code it’ll make the code less readbale
no, just using other macros from clj
macros in cljs never gets easier 😄
yeah as soon as its loaded it uses the macro. the self :require-macros
was meant to protect against that but it doesn't work in CLJS.
nice! how did you do this?
shadow-cljs has a custom parser for the ns
form so it doesn't use the default code for that part
haha wait .. nevermind. I changed that recently because too many people were relying on the "broken" behaviour 😛
ok, that’s understandable
@roman01la Generally you get the macro if it is in operator position, but the function if you need to take its value. You can force the issue if you need to. For example (#'+ 2 3)
should use the function, not the macro.
This is documented in the second note under https://clojurescript.org/about/differences#_macros
@U04VDQDDY Can’t do this bc this macro/fn is a part of public API. Voted for that issue, but don’t want to force it since I don’t know how it can potentially impact existing users
New project: cljs-corpus, a greppable local archive of ClojureScript source code: https://github.com/pesterhazy/cljs-corpus Feedback welcome!
I’m struggling to create test profiles to run clj and cljs tests. I’m using doo for cljs but I need to include test dependencies and I can’t seem to get them recognised. can anyone show me an example of a project.clj (sensitive bits removed) showing how I might configure it?
Hi. If I understand correctly, you can include new dependencies in your profile like so: https://github.com/imatic/re-frame-form/blob/e4f2ca430dc83e3e9d78402c4dddee3a8ddb9480/examples/re-frame-form/project.clj#L19
and then use lein with-profile <profile> ...
to run lein command with specified profile like so: https://github.com/imatic/re-frame-form/blob/e4f2ca430dc83e3e9d78402c4dddee3a8ddb9480/.travis.yml#L10
linked example uses prod
profile that adds new dependency day8.re-frame/tracing-stubs
.
@eleanor.mann I haven't tried it, but this looks like a solution: https://stackoverflow.com/questions/21655258/cljsbuild-target-specific-dependencies