This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-03
Channels
- # beginners (98)
- # boot (18)
- # chestnut (2)
- # cider (90)
- # cljdoc (3)
- # cljs-dev (1)
- # clojure (64)
- # clojure-dev (14)
- # clojure-dusseldorf (4)
- # clojure-italy (11)
- # clojure-nl (5)
- # clojure-spec (9)
- # clojure-uk (69)
- # clojurescript (63)
- # code-reviews (2)
- # core-logic (20)
- # cursive (13)
- # datomic (52)
- # dirac (2)
- # emacs (4)
- # figwheel (6)
- # hyperfiddle (13)
- # luminus (4)
- # nrepl (1)
- # off-topic (7)
- # onyx (9)
- # overtone (3)
- # parinfer (3)
- # pedestal (1)
- # re-frame (31)
- # reagent (74)
- # reitit (34)
- # rum (3)
- # shadow-cljs (51)
- # spacemacs (22)
- # specter (7)
- # tools-deps (23)
- # uncomplicate (3)
- # vim (9)
@thheller is there a way to load a namespace that, for example, sets up custom test clojure.test/report
handlers and stuff?
I would go for preload
but I remember last time we discussed about why it is not in :node-test
Hey everyone I'm finally ready to share what I have been working on. I call it Shadow JAM a JAMstack build tool built with Shadow CLJS. At the moment it's a very rough prototype. Would love it if others with more clojure experience could chime in and help me make it better. I'd love it to have a lot more polish before it lands on something like Reddit as I think it would bring a lot of interest to how much better the experience can be building Progressive Web Apps in Clojure/Script than the alternatives. https://github.com/groundedSAGE/shadow-jam
Would love your feedback on this @thheller
I'll try to go over it soon. saw a few rough mistakes and you should really turn this into a proper library. people cloning all this code is absolutely not ideal and makes it extremely hard to upgrade in the future.
Yea it’s really rough, I can point to many mistakes. I either don’t know how to fix them or my domain confidence is somewhat lacking. I do plan to turn it into a library. I’ve had people telling me I should make it public so that others can help with it.
Hey everyone. I am trying to use shadow-cljs for electron development. I used this repo https://github.com/ahonn/shadow-electron-starter. Everything works except live reloading. Din't find how to enable it. In terminal I see compilation after changes but nothing is happening in electron app.
@endenwer the setup in that repo is a bit broken. try changing the config to
:renderer
{:target :browser
:output-dir "resources/public/js"
:asset-path "js"
:modules {:renderer {:init-fn app.renderer.core/start!}}
:devtools {:after-load app.renderer.core/start!}}
and then removing the blank (start!)
call from the app.renderer.core
ns otherwise it'll be called twice on startup
@thheller Thanks. It works, but I also had to update shadow-cljs version. I can submit pr with all changes if it makes sense.
Cider repl shows this WARNING: No Clojure project was detected. The refactor-nrepl middleware was not enabled. (You can mute this warning by customizing 'cljr-suppress-no-project-warning'.)
Can I somehow fix it?
I think you need to add https://github.com/clojure-emacs/refactor-nrepl to your deps but better ask someone actually using cider. I have no idea what its for.
for example I have (ns myns.core (:require ["xregexp" as xregexp]))
and can use it fine, stuff like (def my-re (xregexp "some.*regex" "g"))
works fine, but Cursive shows xregexp cannot be resolved
@samuel.wagen no that is not currently supported by cursive unfortunately
Yes, someone just told me about the funding. Great to hear! I guess it still is a bit more symbolic than real pay, but, boy, does shadow-cljs deserve the recognition!
When using the :npm-module
target what will my-constant
be exported as for something like (def ^:export my-constant 5.662)
?
Why could it be that the cljs-repl complains about no application connected? I have started the app and I get this when I start the cljs repl:
$ npx shadow-cljs cljs-repl :calva
shadow-cljs - config: /Users/pez/Projects/clojure4vscode/shadow-cljs.edn cli version: 2.4.26 node: v10.1.0
shadow-cljs - connected to server
[3:1]~cljs.user=> 1
No application has connected to the REPL server. Make sure your JS environment has loaded your compiled ClojureScript code.
[3:1]~cljs.user=>
It seems to tell me that it is connected to the server, but then complains that it is not. This used to work, and I don’t think I have changed something that should make it stop working. Funny thing is that the nREPL client in Calva can connect and can do everything I tell it, except evaluating (which gives the same error message as trying to evaluate from the REPL prompt).Building to a local directory, not in node_modules
, if that makes any difference for this problem.
Congrats congrats, happy to see the project receiving recognition from the community!
Are JS includes (described in https://shadow-cljs.github.io/docs/UsersGuide.html#classpath-js) run through the Closure Compiler with advanced compilation during a release build? If so, is there a way to turn it off for those files?
@thheller was not being able to use the REPL the price to be payed for switching to :npm-module
? 😃
@pez :npm-module
doesn't have a clearly defined entrypoint and as such cannot properly "preload" the devtools client. you can load it manually from JS though. so assuming you do import ... from "shadow-cljs/your.ns";
somewhere
well either way the point is to load shadow-cljs/shadow.cljs.devtools.client.browser
before any other CLJS import
@koz yes they run through :advanced
but no you can't turn that off (currently). why would you want to?
It seems to be mangling some of my objects, for instance I’m declaring something like var kb = this.quill.keyboard;
(which has an addBinding()
method, which I call via kb.addBinding()
. When I run it through advanced compilation, it turns kb.addBinding()
into something like b.rE()
, which it can’t find (I believe b
still resolves to this.quill.keyboard
, but it doesn’t have an rE()
function on it).
I can try to draw up a simple repro case since there may be other variables at work here.
@koz did you try shadow-cljs check your-build
? you should be getting a warning for that case
but check
should find the problem. since you already know the problem though you can just create the externs/your-build.txt
with one line addBinding