This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-13
Channels
- # beginners (78)
- # boot (27)
- # cider (13)
- # cljs-dev (41)
- # cljsrn (4)
- # clojure (216)
- # clojure-android (1)
- # clojure-conj (6)
- # clojure-greece (1)
- # clojure-italy (11)
- # clojure-russia (127)
- # clojure-spec (63)
- # clojure-uk (34)
- # clojurescript (68)
- # core-async (5)
- # cursive (5)
- # data-science (1)
- # datomic (4)
- # dirac (11)
- # editors (7)
- # events (1)
- # graphql (12)
- # hoplon (39)
- # jobs (1)
- # liberator (3)
- # lumo (101)
- # off-topic (14)
- # om (3)
- # onyx (3)
- # parinfer (14)
- # re-frame (10)
- # reagent (2)
- # remote-jobs (1)
- # ring-swagger (17)
- # sql (21)
- # untangled (38)
- # vim (3)
- # yada (23)
this might not be right, but my understanding is that hoplon does compiling per-page
so yeah, it's faster to have some kind of dynamic routing under one page than lots of pages all compiling
as yet, i do not know what impact this has on SEO, if any, maybe @alandipert or @micha could give more details on that?
@mudphone @thedavidmeister if you look at the boot-hoplon task, once there are hl files detected, it goes through and compiles those to cljs then parses the cljs files, depending on your project size this can take a while
for this reason I am converting all my libraries to cljs to speed up build times
and I use .hl for the page
macro
@flyboarder is it any faster/slower to use .cljs
instead of .hl
files for a given page?
e.g. (ns ^{:hoplon/page "index.html"} pages.index ...)
Yeah using a cljs file will always be faster
Else you always need an extra build task which will take time
I find if I use .hl
for the index page only and cljs for everything else I get a decent build time, then factoring components into smaller libraries cuts down on app level code which requires rebuilding
I am often running 4 builds at a time of multiple components
i do only have one .hl
atm
if i move things into something on clojars, will that speed up my build times too?
moving things to separate projects limits the number of files/folder tracked
but that seems unnecessary
ah ok, i didn't now whether clojure still needed to compile dependencies
i assumed it would need to
Does anyone know if there is a way to get hoplon to play nice with an existing instance of jQuery? I have a site using clojurescript, and I was considering incorporating hoplon in order to add a new planned feature, but requiring hoplon in any namespace seems to clobber the existing jQuery and plugins that the site already uses. Is there anyway to get hoplon to use the pre-existing instance of jQuery rather than requiring its own?
@tjscollins you probably need to exclude the jQuery dependency when including hoplon
@thedavidmeister @flyboarder thank you, I have much to think about now.
@dm3 That doesn't seem to do it. It's weird. Simply having
(ns theme.test
(:require [hoplon.core :as h]))
Breaks the existing jQuery plugins. Looking through hoplon.core, it never actually pulls in another instance of jQuery that I can find. Looking in Dev Tools, only the the jQuery I have listed in :foreign-libs ever gets loaded. But still it gets broken by hoplon. I have no idea why.@dm3 I'm using a jQuery plugin to create a carousel. It works without hoplon loaded, and with hoplon loaded I get a nonresponsive mess. Basic jquery stuff seems to work, but the plugin is totally broken (plugin is slick, if that matters)
yeah, but where does it start to break in javascript? Hoplon doesn’t go and modify jQuery internals, so if you’re sure that you have the right jQuery version on the page - you should be good
@dm3 I'm not sure what you mean. Every looks right, except the carousel plugin. I just tried a few other parts of the site and that seems to be the only thing breaking.
None.
The plugin must be making some global assumption that hoplon breaks...but I have no idea what.
@mudphone re: hoplon speed, in hoplon 7.0.0 there was a big improvement
or rather, 7.0.1 is the one you want