ClojureScript Is Not An Island: Integrating Node Modules
clojurescript.org
ClojureScript Is Not An Island: Integrating Node Modules
1–10 of 43 posts
Re: ClojureScript Is Not An Island: Integrating Node Modules
#2Re: ClojureScript Is Not An Island: Integrating Node Modules
#3This feature is really, really a long time coming. Myself and other ClojureScript core contributors are happy to answer any questions people may have.
It would be cool if I could just plug and play!
Re: ClojureScript Is Not An Island: Integrating Node Modules
#4This feature is really, really a long time coming. Myself and other ClojureScript core contributors are happy to answer any questions people may have.
It sounds like this handles extern inference if possible. Is that the case? I have wanted to play around with Webrtc for a while now but it basically requires adapter.js ( https://github.com/webrtc/adapter ) and as a result a ton of externs. It would be cool if I could just plug and play!
Granted this rules out some libraries, there are plenty of libraries written in a simple straightforward style that will work just fine. In particular I am bullish about fantastic results with ES6+ libraries written with ES6 classes with static import/export. Closure will eat that stuff up.
Re: ClojureScript Is Not An Island: Integrating Node Modules
#5It'll be nice to have such an easy integration.
Re: ClojureScript Is Not An Island: Integrating Node Modules
#6Earlier quoted context omitted.
It sounds like this handles extern inference if possible. Is that the case? I have wanted to play around with Webrtc for a while now but it basically requires adapter.js ( https://github.com/webrtc/adapter ) and as a result a ton of externs. It would be cool if I could just plug and play!
There's no extern inference required here as all the original sources are passed directly through Google Closure Compiler. As a benchmark for feasibility when we started we chose React.js as it's non-trivial and heavily depended upon in the ClojureScript ecosystem. We discovered that over all of React's sources we only need 4 extern definitions for 4 generated names in EventsPlugin. So as long as the JS library in qu…
Re: ClojureScript Is Not An Island: Integrating Node Modules
#7Re: ClojureScript Is Not An Island: Integrating Node Modules
#8The thing I like about Clojurescript is the ability to escape the node/NPM ecosystem entirely. It's feature, not a bug, that I don't want to interoperate with node/NPM.
Re: ClojureScript Is Not An Island: Integrating Node Modules
#9The thing I like about Clojurescript is the ability to escape the node/NPM ecosystem entirely. It's feature, not a bug, that I don't want to interoperate with node/NPM.
Re: ClojureScript Is Not An Island: Integrating Node Modules
#10For example, in https://github.com/omcljs/om/blob/c68e668a73cc534ecfdc71d631... (couldn't think of any Clojurescript library), you have `[om.dom`, `[cljsjs.react`, `[goog.dom`. Where does the compiler look for these things? How does it knows one is a local module and the other an external package?
I need to know this so I can implement it in https://github.com/fiatjaf/module-linker