Re: How to include ClojureScript into HTML page?

2020-03-22 Thread nenad mitrovic
Ok. I will. Thank you.

On Sun, Mar 22, 2020 at 4:42 PM Matching Socks  wrote:

> Feel free to post this kind of question to https://ask.clojure.org/,
> where things are better organized.
>
> At the risk of not answering your specific question, I'd suggest you put
> aside "Web development with Clojure" for matters of ClojureScript.  (And
> regard with suspicion any template system that obscures "script"
> elements!)  Hop over to either the Quick Start at clojurescript.org, or
> the getting-started guide for Figwheel or Shadow-cljs on their respective
> websites, since those are highly expeditious tools for a rip-snorting
> ClojureScript workflow.  The clojurescript.org guide is minimalist, which
> helps you distinguish "ClojureScript" from "the tool", but you will
> eventually wind up using either Figwheel or Shadow-cljs in any event.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/clojure/e98c164c-856d-4256-ad6c-a20dc262fa2f%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/CABq38O_kJBWtk2CyMdaFi8uAcUPjS7%3D0gpgVaj3F%3DStnw3Of8Q%40mail.gmail.com.


Re: How to include ClojureScript into HTML page?

2020-03-22 Thread Matching Socks
Feel free to post this kind of question to https://ask.clojure.org/, where 
things are better organized.

At the risk of not answering your specific question, I'd suggest you put 
aside "Web development with Clojure" for matters of ClojureScript.  (And 
regard with suspicion any template system that obscures "script" 
elements!)  Hop over to either the Quick Start at clojurescript.org, or the 
getting-started guide for Figwheel or Shadow-cljs on their respective 
websites, since those are highly expeditious tools for a rip-snorting 
ClojureScript workflow.  The clojurescript.org guide is minimalist, which 
helps you distinguish "ClojureScript" from "the tool", but you will 
eventually wind up using either Figwheel or Shadow-cljs in any event.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/e98c164c-856d-4256-ad6c-a20dc262fa2f%40googlegroups.com.


Re: How to include ClojureScript into HTML page?

2020-03-21 Thread nenad mitrovic


Or even better, when I create simple HTML file without extending any 
base.html file, how to add clojurescript namespace, how to reference it? 
You know, like javascript helloworld example




How to do this in ClojureScript?

On Sunday, March 22, 2020 at 1:20:06 AM UTC+1, nenad mitrovic wrote:
>
> I am following guestbook example from the book Web Development With 
> Clojure 3rd edition. I am struggling with including ClojureScript namespace 
> into HTML document. Everything is working fine with example where I have 
> one core.cljs. With that file, only I have to do is to include this piece 
> of code into home.html document:
>
> {% extends "base.html" %}
> {% block content %}
> 
> 
> {% endblock %}
> {% block page-scripts %}
> {% script "/js/app.js" %}
> {% endblock %}
>
> As I mentioned, everything is ok in this situation. But when I created 
> additional ClojureScript file and name it test.cljs and included that in 
> the same way in the new HTML document named test.html I see errors in the 
> console such as "Target container is not a DOM element.". I think that 
> something is wrong with this part:
>
> {% block page-scripts %}
> {% script "/js/app.js" %}
> {% endblock %}
>
> But I can't figure out how to solve this. Actually, my question maybe 
> should be: How to include ClojureScript into HTML file?. Is the only way 
> this piece of code?
>
> {% block page-scripts %}
> {% script "/js/app.js" %}
> {% endblock %}
>
> Or, maybe I should change {% script "/js/app.js" %} part of this snippet?
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/657930a2-fc29-42fc-b1f5-30cf2bc10bb1%40googlegroups.com.