You just need a route in the backend that resolves to the resource. I think compojure has a resource-response helper for this.
On Wednesday, May 28, 2014, Paul Butcher <[email protected]> wrote: > I have a followup question to this. Right now my HTML files use a <script> > tag to refer to a copy of react.js or react.min.js that I've placed in > resources/public. > > I know that I could avoid this by using :preamble, but if I want to stick > with using a <script> tag, is there any way to use the copy of react.js > that's bundled with Om? > > Having a local copy of react isn't a huge issue, but using the version > bundled with Om would ensure that I don't end up with strange behaviour > if/when the version bundled with Om is updated and I forget to update my > local copy. > > > On Mon, May 19, 2014 at 9:01 PM, Eduard Bondarenko <[email protected]>wrote: > > I think preamble and externs are needed for whitespace and advanced > optimizations. For 'none' you need to manually add script tags. > Best regards, > Eduard > > > On Mon, May 19, 2014 at 10:54 PM, David Nolen <[email protected]> > wrote: > > All of this is correct. > > > > > > On Mon, May 19, 2014 at 12:06 PM, Juan Manuel Gimeno Illa > > <[email protected]> wrote: > >> > >> I have some confusion about how dependencies work with om an react. > >> > >> If I declare my project dependent on om by adding [om "0.6.2"] as om > >> declares a dependency on react (with [com.facebook/react "0.9.0.1"] in > its > >> project.clj) this jar is added to my dependencies and I can access the > >> javascript file. > >> > >> If I put in my project.clj, in the cljsbuild section, :preamble > >> ["react/react.min.js"] and :externs ["react/externs/react.js"], I > suppose > >> react.min.js is added to the output of the compiled javascript of my > >> project, so I don't need add a script tag for the react javascript, do > I? > >> > >> Are my interpretations right? I'm having some problems comparing > examples > >> because each one I read is doing things differently (I understand this > is > >> normal in a fast evolving and unstable library). > >> > >> 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. > > -- > 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 -- 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.
