Open thheller opened 7 years ago
So... this is quite a lot of work - I'd be interested in supporting this, but realistically generating a fake project.clj is going to be your best option for a while (boot users still have to do this). When I add boot support, I'm going to be using a new IntelliJ API which might make this easier, but I don't have a good feeling for how much easier.
Do you support multiple projects/modules which reference each other?
I guess Cursive will eventually support deps.edn
and if shadow-cljs
used it internally as well (its :deps, :paths
is all you asked for about, right?) then the issue would be sovled?
What would be the priority of this issue? I think this is quite an important issue to solve.
You can get decent support these days via shadow-cljs pom
and importing the generated pom.xml
in Cursive (requires Maven plugin) or just using deps.edn
. Of course the project.clj
way also still works.
Is there a way to get support for npm deps that shadow-cljs supports? Currently Cursive fails to resolve all of them:
(ns my.button
(:require
["@rmwc/button" :as button]))
(defn button []
[:> button/Button {:label "Click me"}])
In this example the button/Button
cannot be resolved, even though it all works fine.
Is there a way to get support for npm deps that shadow-cljs supports? Currently Cursive fails to resolve all of them:
(ns my.button (:require ["@rmwc/button" :as button])) (defn button [] [:> button/Button {:label "Click me"}])
In this example the
button/Button
cannot be resolved, even though it all works fine.
@thheller I have to re-generate the pom.xml
file every time I install a new dependency. That's fine for now because I setup a file watcher to run shadow-cljs pom
for me on changes in the shadow-cljs.edn
file.
However, I can't get it to resolve variables from the js
runtime. Any solutions for that?
shadow-cljs
is a full build solution for CLJS projects. It is the successor toshadow-build
and is capable of managing:dependencies
for CLJS projects. Unfortunately I can't use it with Cursive directly and still have a create a "dummy"project.clj
.It would be neat if Cursive recognized the
:dependencies
and:source-paths
without aproject.clj
.shadow-cljs
works pretty similar tolein
in that it is configured by ashadow-cljs.edn
file in the project directory, except that it is pure EDN data. The most basic example config would look something like this::dependencies
has the same structure aslein
orboot
would have as it uses the same underlyingcemerick/pomegranate
library to manage them.:source-paths
is identical as well. There might be a:dev-dependencies
,:test-paths
and:resource-paths
soon too but the same rules would apply here. I don't think there is a need for:profiles
.:builds
support could maybe be done at a later date but since:source-paths
is global and there are no build-specific:source-paths
that is not a high priority. It could maybe exclude all:output-dir
paths (always relative to the project root) but thats is also not a high priority.shadow-cljs
also provides a nREPL server but that already works perfectly fine with Cursive "Remote nREPL". I know that you are working on Socket REPL support and that should just work as well.Let me know if there is anything I can do to help. There aren't that many users (yet) but it has been getting some attention.