Fork me on GitHub

i use both of those and had to add [ "21.0"] to my deps


so clj->js does not transform #uuid tags, is there a way to do that automatically?


@dpsutton If you mean beyond cljs.test, try fulcro-spec. It’s built on top of cljs/clojure test, but adds some handy things.


i guess just about setting up autmatic local runners, jenkins runners, etc


my work doesn't have cljs tests but does have clj tests and i would like to change that


So, try out the fulcro lein template. It is set up with clj and cljs test, dev mode is accomplished in a nice browser UI (hot code refresh/re-run). CI tests are part as well. The README you get describes the bits:

lein new fulcro my-project


thanks. i'll check it out tomorrow


Fulcro-spec is a standalone that can be used for testing in any project. Fulcro itself is a full-stack SPA system.


@richiardiandrea clj->js has nothing to do with #uuid tags really


they’re JS objects


but you can probably extend-protocol IEncodeJS to the UUID type


Oh that is what I was looking for yep. I figured I needed a custom writer, thanks!


Actually I would probably want to customize how the key is treated really, more than relying on uuid tags really. So I'll probably use key->js.


I have followed the instructions @ to the letter (copy-pasted a repl.clj file and launched the REPL using it), but I still don't have CLJS-oriented file/line number info in stack traces. What things should I check for to diagnose the problem?


@cemerick are you targeting Node.js?


^ weird question. better: is the REPL evaling in Node.js?


@anmonteiro yes, sorry, using node 6.10.3, if that matters


make sure you have installed source-map-support


npm install source-map-support


oh! look at that


was I supposed to know that?


I don’t think so


I remember this being written down somewhere


perhaps didn’t make it from the wiki to the website


it’s unfortunate how bad the GitHub search is


this is probably common knowledge for anyone that uses node.js as it was intended, etc


it’s not in the wiki as well


I basically use it as a CLJS black box


ok, so that mostly works!


yeah, it’s not very good, but at least it’ll tell you the line number


it looks like the source-map-support is only looped in for namespaced loaded after the ((.. (node/require "source-map-support") -install)) call


source maps are much better in the browser /JavaScriptCore


the ClojureScript Node.js REPL should generate that call


I'll do a clean of the output-dir and try again


@cemerick delete .cljs_node_repl in your project dir too


I would so love to get all that guff under target so it gets flushed with everything else


@anmonteiro looking good, very nice, thank you :thumbsup:


I'll pop over with a PR for that page tomorrow


oh, looks like source-map-support is documented after all, in the node section of the quick start:


@anmonteiro ☝️ just FYI. Thanks again 🙂


ah I thought I had seen it somewhere


What is a good tutorial for creating an web app with clojure + clojurescript?


@pvillegas12 can you be more specific, many tutorials out there that teach many different aspects of creating web app in broad sense.


i am using google reCaptcha ( Its works fine in development mode. but it doesn't works in production mode. That is because of foreign-libs.


@sivakumargsk if you are asking a question, then I'd check if the externs you are providing are up to date, if you don't have externs, you probably need to make them. Also, there are more genders here than "guys", this is a habit I also had to get rid off.


@hlolli i write an externs file also it contains var grecaptcha = { "render": function () {}, "reset": function () {}, "getResponse": function () {}, "execute": function () {} }


Looks like this library isn't providing any js functions, so there isn't much reason to include it in foreign libs if you can avoid it, just add <script src=''></script> and give your dom elements the right class names etc. Also in case google updates their js file, then you don't need to do anything on your side.


@hlolli building a web app specifically using clojure as a backend (ring?) + cljs, I’m familiar with other backends + frontend technologies


Ok, you'd want to check out ring and compojure. And routers bidi offers a good backend/frontend routing. Om-next has in my opinion the most beautiful data oriented GraphQL-ish endpoints via its Looking at datomic tutorials you can learn also about other querying languages (pull-syntax) along with datascript (not connected to datomic).


@kingmob that how the Node modules stuff works, via Google Closure Compiler’s support for it, worth reading the blog for details

Matthew Davidson (kingmob)16:09:47

@dnolen Yeah, I’ve been poring over them nonstop since yesterday. It’s tricky because there’s important details that are scattered around and older pages that haven’t been brought up-to-date yet. E.g., the Dependencies page still says about :foreign-libs that “Foreign libraries are included in your final output, but are not passed through advanced compilation”, though my understanding is that setting :module-type under :foreign-libsmeans the library will go through advanced compilation, according to the Javascript Module Support page.

Roman Liutikov16:09:06

Been rereading latest cljs news blog and wondering which "higher level composable facilities" can be built on top of cljs.loader? > This simplification now means downstream libraries can easily build higher level composable facilities upon cljs.loader.

Roman Liutikov16:09:52

For example in JS you have routing library which allows you to define route-based code splits (dynamic imports which are processed by Webpack). But it seems like it's not possible in cljs, since everything should be defined statically.


@roman01la we do route-based code splits with fulcro


We have a edn file which defines all the routes and namespaces and then we generate the :modules part for the clojurescript compiler and stuff for fulcro with a macro

Roman Liutikov17:09:49

Sounds interesting. How do you generate split namespaces?


@kingmob the :npm-deps stuff is a replacement for :foreign-libs and should not be used together. well only if you have your own js that you want to convert, but not for packages

Matthew Davidson (kingmob)17:09:18

@thheller Got it. In our case, we’re more of a plugin than in charge of the .js on the page, so we can’t feed everything through Closure :advanced. In the short run, I’m going to push to do more of our builds outside lein, and in the long run, maybe we can produce a build where cljs is in control.


I am just getting started with a clojusrescript node project, needs to host some http services, is there a good place to start looking for docs / examples ?


@len I was looking into the same thing recently. This ended with "mmh I want to try macchiato" I settled for doing my http service with clojure/ring, so I can't speak much more about macchiato


Question, which options is accepting and how do they modify the behavior of pr-str?


(is it worth using?)


@richiardiandrea I think there is (pr-opts) or something like that for the default opts. It is related to the IPrintWithWriter protocol and which effect the opts have is dependent pretty much on each individual protocol implementation


Ok thanks, will dig into the source