[ClojureScript] Re: Script tags in Html for different environments
This is the sweet spot for lein profiles. cljs-start has a good example of it. The nice thing about using profiles is that you can reuse as much as you want in your dev profile code (which will probably just be a few simple items like handlers and template page or two) and then your prod config can be whatever you want. I highly recommend using a template for this, cljs-start is a good one. I'm sort of working on a cljx-start template modeled somewhat after cljs-start but its on the backburner since it requires a bunch of testing. (having too much these days with opt none and d3 in cljs) -- 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
Re: [ClojureScript] om cursors and protocols
On Tuesday, July 29, 2014 10:00:47 AM UTC-4, David Della Costa wrote: Hi Tal, I'm not positive this will fully answer your question, but here is a very simple example of how to extend MapCursor and call the extended type inside the render phase of a component. https://github.com/ddellacosta/om-cookbook/blob/master/extend-cursor/src/core.cljs Let me know if there's more to it than this, or post gist with your code to the list if you need more specific assistance. DD (2014/07/29 3:14), tal giat wrote: How can I have an om cursor implement a protocol and then call that protocol method from an om component ? the problem is that I'm getting an error calling the protocol method because the type now is not the given type but om.core/MapCursor. Thanks, I'll give it a try! -- 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
Re: [ClojureScript] Keyword Hashing
Yes, I'm only testing Safari on iOS. Which looking at my logs seems to be the only one affected. Only Mobile Safari User Agents were sending maps with duplicate keys. No luck producing a more compact example though. -- 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
Re: [ClojureScript] Re: Script tags in Html for different environments
Thanks everyone for the replies. It is really useful to hear your thoughts. I am summarizing the options and my thoughts around them: - https://github.com/thheller/shadow-build I havent looked into this. I will check and see if it solves my use case. - Enlive to override the index.html in development environment. - I like this option. This will avoid the duplication across the production html and development html. And clearly identify the differences. - Middleman to generate the static page. - I would see if there are any clojure static site generation tools instead of ruby. But this is too much overhead for the simple files I am planning to have. - Lein profiles - I didnt understand how this will help. I am using profiles for dev and production clojurescript compilation. But the problem is both profiles generate different javascript files and hence different html files. I am inclined more towards the enlive approach right now. Thanks, Uday. -- 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
Re: [ClojureScript] om cursors and protocols
Hi, My preferred solution for this issue is calling `om/value' on the cursor before passing it to non-ui parts of the application. You can also move that call into the functions that get called itself, as it's equal to the identitty-functions for non-cursors. The other (more hacky) solution is extending MapCursors etd. to the protocols you need wrap every function of those with `om/value'. This has the benefit of being non-visible when using cursor, but has the drawbacks of braking `satisfies?' etc. tal giat writes: How can I have an om cursor implement a protocol and then call that protocol method from an om component ? the problem is that I'm getting an error calling the protocol method because the type now is not the given type but om.core/MapCursor. -- Moritz Ulrich pgpUekvJc6kWM.pgp Description: PGP signature
Re: [ClojureScript] Keyword Hashing
Created a patch to address that :emit-constants issue. http://dev.clojure.org/jira/browse/CLJS-829 Can't say wether its related to the issue at hand but less duplicate code is always good. -- 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
Re: [ClojureScript] Keyword Hashing
Applied to master thanks. David On Tue, Jul 29, 2014 at 2:29 PM, Thomas Heller th.hel...@gmail.com wrote: Created a patch to address that :emit-constants issue. http://dev.clojure.org/jira/browse/CLJS-829 Can't say wether its related to the issue at hand but less duplicate code is always good. -- 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
[ClojureScript] [ANN] Bootstrap-CLJS, a ClojureScript wrapper for React Bootstrap
Hi, Here's the repo: https://github.com/luxbock/bootstrap-cljs This is my first and modest OS project. I'm a bit fan of om-tools [1], and I wanted to use React Bootstrap [2] with the same convenient syntax, so I created this wrapper. Examples with Devcards and a Weasel browser REPL are included for you to play around with. Hope some of you find it useful. [1] https://github.com/Prismatic/om-tools [2] http://react-bootstrap.github.io/ -- 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
Re: [ClojureScript] Keyword Hashing
So you or do not have a minimal case for Mobile Safari that I can test with? Thanks, David On Tue, Jul 29, 2014 at 4:16 PM, Thomas Heller th.hel...@gmail.com wrote: Thanks. I give up. I have no more ideas what to test, whats even more annoying is that when I attach the remote debugger BEFORE navigating to the page producing the faulty maps the bug doesn't show. If I do the exact same steps but attach the remote debugger AFTER loading the page the bug happens. At least I can tell you that the release 0.0-2234 doesn't have this problem. So it was introduced some time after https://github.com/clojure/clojurescript/compare/b8c4a40d9a795899b86fd33e6024a19b899640db...master But since the murmur3 hashing was introduced after 2234 thats no surprise. Happy to test any ideas you might have, but I can't think of anything I haven't tried. -- 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
Re: [ClojureScript] Re: ANN: ClojureScript 0.0-2277
Just tried :repositories {sonatype-oss-public {:url https://oss.sonatype.org/content/groups/public/; :snapshots false} sonatype-1311 {:url http://oss.sonatype.org/content/repositories//orgclojure-1311} sonatype-1312 {:url http://oss.sonatype.org/content/repositories//orgclojure-1312} local file:maven} and [org.clojure/clojurescript 0.0-2234] [org.clojure/google-closure-library 0.0-20140718-946a7d39] Confirmed to resolve CLJS-826. On Tuesday, July 29, 2014 10:30:21 PM UTC+2, David Nolen wrote: Just add sonatype to your :repositories project.clj entry https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L79 David On Tue, Jul 29, 2014 at 4:22 PM, Thomas Heller th.h...@gmail.com javascript: wrote: Uhm small hint on how I'd do that? My maven-fu is weak. But given that https://oss.sonatype.org/content/repositories/orgclojure-1311/org/clojure/google-closure-library-third-party/0.0-20140718-946a7d39/google-closure-library-third-party-0.0-20140718-946a7d39.jar does not contain a goog/base.js or goog/deps.js we should be good. -- 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 clojurescrip...@googlegroups.com javascript:. To post to this group, send email to clojur...@googlegroups.com javascript:. 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
Re: [ClojureScript] Re: ANN: ClojureScript 0.0-2277
Thanks! On Tue, Jul 29, 2014 at 4:48 PM, Thomas Heller th.hel...@gmail.com wrote: Just tried :repositories {sonatype-oss-public {:url https://oss.sonatype.org/content/groups/public/; :snapshots false} sonatype-1311 {:url http://oss.sonatype.org/content/repositories//orgclojure-1311} sonatype-1312 {:url http://oss.sonatype.org/content/repositories//orgclojure-1312} local file:maven} and [org.clojure/clojurescript 0.0-2234] [org.clojure/google-closure-library 0.0-20140718-946a7d39] Confirmed to resolve CLJS-826. On Tuesday, July 29, 2014 10:30:21 PM UTC+2, David Nolen wrote: Just add sonatype to your :repositories project.clj entry https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L79 David On Tue, Jul 29, 2014 at 4:22 PM, Thomas Heller th.h...@gmail.com wrote: Uhm small hint on how I'd do that? My maven-fu is weak. But given that https://oss.sonatype.org/content/repositories/orgclojure-1311/org/clojure/google-closure-library-third-party/0.0-20140718-946a7d39/google-closure-library-third-party-0.0-20140718-946a7d39.jar does not contain a goog/base.js or goog/deps.js we should be good. -- 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 clojurescrip...@googlegroups.com. To post to this group, send email to clojur...@googlegroups.com. 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
[ClojureScript] Problems with :advanced compilation
Hi, I have a large-ish ClojureScript/Om application and I'm unable to run it when compiled with :optimization :advanced. :none, :whitespace and :simple all work perfectly, but :advanced gives me an undefined is not a fucntion on the RN from the following snippet of code: return u.owner.RN( ... ) I tried adding every other js file that I use as an extern, just in case, but this did not make a difference. Has anybody else encountered something like this before? How did you approach debugging it? Any tips or ideas would be greatly appreciated! -- 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
[ClojureScript] Re: Problems with :advanced compilation
I'm assuming that I need to determine what the RN refers to when not minified and then write a proper extern file for it.. On 30 July 2014 00:15, Daniel Kersten dkers...@gmail.com wrote: Hi, I have a large-ish ClojureScript/Om application and I'm unable to run it when compiled with :optimization :advanced. :none, :whitespace and :simple all work perfectly, but :advanced gives me an undefined is not a fucntion on the RN from the following snippet of code: return u.owner.RN( ... ) I tried adding every other js file that I use as an extern, just in case, but this did not make a difference. Has anybody else encountered something like this before? How did you approach debugging it? Any tips or ideas would be greatly appreciated! -- 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
Re: [ClojureScript] Re: Problems with :advanced compilation
Using JS libs as their own externs is not guaranteed to work. You just need to supply extern files for all calls that involve JS code that Closure will not see. David On Tue, Jul 29, 2014 at 7:20 PM, Daniel Kersten dkers...@gmail.com wrote: I'm assuming that I need to determine what the RN refers to when not minified and then write a proper extern file for it.. On 30 July 2014 00:15, Daniel Kersten dkers...@gmail.com wrote: Hi, I have a large-ish ClojureScript/Om application and I'm unable to run it when compiled with :optimization :advanced. :none, :whitespace and :simple all work perfectly, but :advanced gives me an undefined is not a fucntion on the RN from the following snippet of code: return u.owner.RN( ... ) I tried adding every other js file that I use as an extern, just in case, but this did not make a difference. Has anybody else encountered something like this before? How did you approach debugging it? Any tips or ideas would be greatly appreciated! -- 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
Re: [ClojureScript] [ANN] Bootstrap-CLJS, a ClojureScript wrapper for React Bootstrap
Is the site supposed to work on mobile? Tried in Chrome on my HTC One and the page loaded but the collapsed menu doesn't work. Cheers, Leonardo Borges @leonardo_borges www.leonardoborges.com On Wed, Jul 30, 2014 at 8:41 AM, Daniel Kersten dkers...@gmail.com wrote: Cool! Will be looking into using this for sure. I agree with Paul though, you should deploy it to clojars. On 29 July 2014 22:49, Paul English p...@onfrst.com wrote: Very cool, you should deploy a version to Clojars to make it accessible. On Jul 29, 2014, at 1:58 PM, Olli Piepponen kot...@gmail.com wrote: Hi, Here's the repo: https://github.com/luxbock/bootstrap-cljs This is my first and modest OS project. I'm a bit fan of om-tools [1], and I wanted to use React Bootstrap [2] with the same convenient syntax, so I created this wrapper. Examples with Devcards and a Weasel browser REPL are included for you to play around with. Hope some of you find it useful. [1] https://github.com/Prismatic/om-tools [2] http://react-bootstrap.github.io/ -- 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
Re: [ClojureScript] kioo dynamic selectors
Mark, Yes, kioo now supports a transform called lifecycle that allows you attache react lifecycle methods to any node. I am putting together a sample app to demonstrate it over the next few days. In the mean time below is a working example of controlling focus and changing input sate with om and kioo. This is the original version of todomvc I wrote for kioo. It uses an older version of om but fixing that shouldn't be difficult. https://github.com/ckirkendall/todomvc/blob/gh-pages/labs/architecture-examples/kioo/src/todomvc/item.cljs -- 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.