Are you referring to Compojure’s “resources" function?:

http://weavejester.github.io/compojure/compojure.route.html#var-resources

I am already using that to provide access to the copy of react that I’ve got in 
my resources folder. How could I use it to serve the copy of react that’s 
bundled with Om?

--
paul.butcher->msgCount++

Silverstone, Brands Hatch, Donington Park...
Who says I have a one track mind?

http://www.paulbutcher.com/
LinkedIn: http://www.linkedin.com/in/paulbutcher
Skype: paulrabutcher

Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel
http://pragprog.com/book/pb7con

On 28 May 2014 at 13:12:50, Gary Trakhman ([email protected]) wrote:

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.

-- 
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.

Reply via email to