Re: [ClojureScript] Using a cljs project in 'raw' JavaScript
Thanks David, I will have a look. On 7 July 2016 at 18:26, David Nolenwrote: > Does goog.exportSymbol not work for your case? The transit-js project is a > good example of how to make Closure targeted code be usable by regular > JavaScript. It's really no different for ClojureScript. > > https://github.com/cognitect/transit-js/blob/620906704f9f6904745895878ad3228607836d31/src/com/cognitect/transit.js#L599-L645 > > David > > On Thu, Jul 7, 2016 at 1:22 PM, Colin Yates wrote: >> >> Hi all, >> >> Any tips for including the JavaScript from a cljs project in a non-cljs >> project? I have a rather unusual situation where I have: >> - util.jar (lots of .cljc files) - the infamous company-wide utility >> library >> - main.war - actually serves two UIs, one ClojureScript and one >> CoffeeScript using ExtJS (and therefore cannot use google closure) >> >> I want to make the JavaScript in util.jar accessible to the _CoffeeScript_ >> part of the main.war. It is already added as a (:requires ...) dependency, >> but the CoffeeScript part has no visibility of that machinery. >> >> The 'main.war' project is built using lein but I am looking for any reason >> to get back into boot. >> >> In the worst case I can: >> - include a non-advanced compilation of the namespaces in util in >> util.jar >> - in main.war, crack the jar open and copy the unadvanced javascript to >> the right place so CoffeeScript can see it >> >> or: >> - have main.war have a cljsbuild config for the util namespaces >> >> Which all feels very unsophisticated and awkward. >> >> Any thoughts/hints/tips? >> >> Thanks, >> >> Colin >> >> -- >> 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 clojurescript+unsubscr...@googlegroups.com. >> To post to this group, send email to clojurescript@googlegroups.com. >> Visit this group at https://groups.google.com/group/clojurescript. > > > -- > 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 clojurescript+unsubscr...@googlegroups.com. > To post to this group, send email to clojurescript@googlegroups.com. > Visit this group at https://groups.google.com/group/clojurescript. -- 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at https://groups.google.com/group/clojurescript.
Re: [ClojureScript] Using a cljs project in 'raw' JavaScript
Does goog.exportSymbol not work for your case? The transit-js project is a good example of how to make Closure targeted code be usable by regular JavaScript. It's really no different for ClojureScript. https://github.com/cognitect/transit-js/blob/620906704f9f6904745895878ad3228607836d31/src/com/cognitect/transit.js#L599-L645 David On Thu, Jul 7, 2016 at 1:22 PM, Colin Yateswrote: > Hi all, > > Any tips for including the JavaScript from a cljs project in a non-cljs > project? I have a rather unusual situation where I have: > - util.jar (lots of .cljc files) - the infamous company-wide utility > library > - main.war - actually serves two UIs, one ClojureScript and one > CoffeeScript using ExtJS (and therefore cannot use google closure) > > I want to make the JavaScript in util.jar accessible to the _CoffeeScript_ > part of the main.war. It is already added as a (:requires ...) dependency, > but the CoffeeScript part has no visibility of that machinery. > > The 'main.war' project is built using lein but I am looking for any reason > to get back into boot. > > In the worst case I can: > - include a non-advanced compilation of the namespaces in util in util.jar > - in main.war, crack the jar open and copy the unadvanced javascript to > the right place so CoffeeScript can see it > > or: > - have main.war have a cljsbuild config for the util namespaces > > Which all feels very unsophisticated and awkward. > > Any thoughts/hints/tips? > > Thanks, > > Colin > > -- > 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 clojurescript+unsubscr...@googlegroups.com. > To post to this group, send email to clojurescript@googlegroups.com. > Visit this group at https://groups.google.com/group/clojurescript. > -- 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at https://groups.google.com/group/clojurescript.
[ClojureScript] Using a cljs project in 'raw' JavaScript
Hi all, Any tips for including the JavaScript from a cljs project in a non-cljs project? I have a rather unusual situation where I have: - util.jar (lots of .cljc files) - the infamous company-wide utility library - main.war - actually serves two UIs, one ClojureScript and one CoffeeScript using ExtJS (and therefore cannot use google closure) I want to make the JavaScript in util.jar accessible to the _CoffeeScript_ part of the main.war. It is already added as a (:requires ...) dependency, but the CoffeeScript part has no visibility of that machinery. The 'main.war' project is built using lein but I am looking for any reason to get back into boot. In the worst case I can: - include a non-advanced compilation of the namespaces in util in util.jar - in main.war, crack the jar open and copy the unadvanced javascript to the right place so CoffeeScript can see it or: - have main.war have a cljsbuild config for the util namespaces Which all feels very unsophisticated and awkward. Any thoughts/hints/tips? Thanks, Colin -- 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at https://groups.google.com/group/clojurescript.
[ClojureScript] Refactoring for ClojureScript?
Is it possible to run something like cljr clean ns [1] on ClojureScript source code? /Linus [1] https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-clean-ns -- 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at https://groups.google.com/group/clojurescript.