Thomas, thanks for the detailed example! I was reading over the weekend about shadow-cljs and it is definitely an intriguing approach. However, my motivation for these es6 experiments is to eventually bring them into a larger project I am working on, which already has an existing boot build framework. Realistically, I'm probably going to have to make it work within the boot ecosystem.
I'm curious why you think :foreign-libs is deeply flawed. It is my understanding that :npm-deps are also converted to :foreign-libs under the hood, and it seems like a lot of work has been put into these features over the last year or two. If the approach was deeply flawed, this would seem like a big deal. On Monday, November 20, 2017 at 9:36:07 AM UTC-5, Thomas Heller wrote: > > The Closure Compiler is fully capable of this. It appears that something > is broken, don't know what. > > In shadow-cljs [1] I handle JS dependencies quite differently so not only > does this work there it is also much simpler (IMHO). > > I made a demo showcasing all of the JS interop here: > https://github.com/thheller/shadow-cljs-examples/tree/master/local-js > > You can clone it and run: > npm install > npx shadow-cljs watch app > open http://localhost:9300 > > These two files are interesting: > > https://github.com/thheller/shadow-cljs-examples/blob/master/local-js/src/demo/app.cljs > > https://github.com/thheller/shadow-cljs-examples/blob/master/local-js/src/demo/foo.js > > The CLJS files is using JS and the JS file is using CLJS. 100% full > interop. > > Note that the use of :default in the ns :require is not yet official [2]. > The support for relative require (ie. "./foo") was rejected and is "never, > ever going to happen." [3]. > > I consider this an experiment to explore alternatives to :foreign-libs as > I think they are deeply flawed and should be abandoned. > > It works well in shadow-cljs but please don't use it in any library until > there is something "official" to make all of this work. > > Cheers, > /thomas > > > [1] https://github.com/thheller/shadow-cljs > [2] https://dev.clojure.org/jira/browse/CLJS-2376 > [3] > https://dev.clojure.org/jira/browse/CLJS-2061?focusedCommentId=46191&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-46191 > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/clojurescript.
