-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add details on deps.cljs #224
Comments
More info: Other optional keys include
See more info here: clojure/clojurescript@21da03e |
I think we probably need a new guide about developing ClojureScript libraries. However I would like any such guide to give recommendations aligned with |
@swannodette How do you envision |
There's nothing more to do it, as what you're talking about is already supported. You can transitively depend on some CLJS lib that depends on node modules and it will work. |
@swannodette Oh interesting! I must be doing something wrong then because the transitive npm deps in my library aren’t found when a consuming project tries to build its CLJS. Both are :target :bundle based. |
You need declare those |
@swannodette Ah, OK. I think I’ve read the blog post in question. I was hoping for a solution where I didn’t need to redundantly specify my npm deps (which are already in package.json for :target :bundle). I’m also hoping to avoid having two different approaches to specifying npm deps in libraries vs. apps. I’d like to just use :target :bundle everywhere. And it feels really close to just working if the library consumers could be told how to build the library too. I just had a conversation about this in the clojurescript channel in Clojurians Slack if you’d like to take this out of this issue. Thanks for your help! |
This is my blog post on the topic: http://widdindustries.com/cljs-npm-libraries/ I can submit the text as a PR if you might use it? |
The
deps.cljs
file is discussed by example in a couple of places:I'd really like to see a slightly more formal description of how this file works. Questions:
deps.cljs
filename hardcoded?:foreign-libs
key?(I think part of my confusion lies from the fact that I'm a bit fuzzy on the mechanics of what happens when you add a dependency string to a lein project file. I always thought that the dependency strings only affected the downloading of dependencies to disk--not compiler options. I think the answer is that the dependency vector downloads the jars to disk and the presence of a
deps.cljs
file on disk affects the compiler, but it'd be great to have this spelled out.)CC: @johnmn3
The text was updated successfully, but these errors were encountered: