The node-require thing uses js-interop, notice it's wrapped in a custom 'when-node' macro.
This is due to a big difference between cljs and clojure, you can't dynamically load namespaces, a la (require ..). Since loading the cljs node namespace will fail on non-node runtimes, I use js interop directly. On Tue, Dec 31, 2013 at 5:58 PM, Eduardo Lávaque <[email protected]>wrote: > Thank you for your answers, Gary and Frank. :) > > I was hoping maybe something a little simpler? > > Like stuff like add `:target :nodejs` to the cljsbuild compiler settings > (which I'm not sure if it's required). > > Gary's `node-require` ( > https://github.com/gtrak/node-cljs-template/blob/master/src-cljs/src/cljs_app/node_bits.cljs#L6) > seems useful but how would one go about using it? > > Frank, your project seems more like what I'm looking for but I'm not sure > of one thing, if I have a working node-webkit in Linux (in $PATH), how > would I go about using that version instead? > > Really I'd like something simpler. Something that is essentially the _bare > minimum_ required to get CLJS working with Node (and node-webkit). > > Thanks! :) > > -- > 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 http://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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
