This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-20
Channels
- # beginners (110)
- # boot (1)
- # cljs-experience (1)
- # clojure (58)
- # clojure-italy (4)
- # clojure-russia (1)
- # clojure-spec (4)
- # clojurescript (51)
- # cursive (2)
- # datomic (4)
- # devcards (4)
- # dirac (1)
- # figwheel (3)
- # fulcro (46)
- # hoplon (11)
- # om (4)
- # parinfer (7)
- # pedestal (1)
- # re-frame (11)
- # reagent (20)
- # specter (6)
- # unrepl (6)
Hi there, is it possible to use clojurescript modules with figwheel or under development configuration?
@cl0jurian Yep. Working perfectly for me.
use 0.5.13 of figwheel and no optimizations. Works like a charm. Some examples can be seen in my devcard demos for Fulcro. https://github.com/fulcrologic/fulcro/blob/develop/src/demos/cards/dynamic_i18n_locale_cards.cljs
It rocks. Tests out fine for dev (no opt), simple, advanced. All working well as of 1.9.0-908 or so
NOTE: If you do play with my demos, advanced optimizations requires using the :production profile.
Make sure you read the docs. You have to call set-loaded!
for each module that gets loaded (as it gets loaded), even the initial one.
I've upgraded to the latest clojurescript release (r1.9.908) and suddenly the funciton nat-int? is missing from core.. and my previously working source code gets the error "Unable to resolve symbol: nat-int? in this context". Any ideas?
Even if I type it out like cljs.core/nat-int? it works.. autocompletion also finds it, only compiling does not work.
how do you guys do localization (just a couple of languages in my case) in Clojurescript projects?
I've seen tempura and tongue as possible options, is there anything else?
i am unable to enable source maps. i get errors with js file names and line numbers. this is my project.clj https://gist.github.com/ashnur/78e17b961568ae8dbbb3bf102753f1f8 . I just start lein figwheel
and write the files.
Any reason CLJS doesn’t support the following? Or anyone know if supported in latest?
#:foo{:bar "baz"}
clojure.lang.ExceptionInfo: Reader tag must be a symbol {:type :reader-exception, :line 1, :column 6, :file "NO_SOURCE_FILE"}
Lumo 1.2.0
ClojureScript 1.9.482
Docs: (doc function-name-here)
Exit: Control+D or :cljs/quit or exit
+cljs.user=> #:foo{:bar "baz"}
{:foo/bar "baz"}
cljs.user=>
@alex-dixon I'd check to see what version of the reader you are using. For example, ClojureScript master currently uses [org.clojure/tools.reader "1.0.5"]
@noisesmith Lumo 1.2?! do you live in a cave? 😄
years in internet time
Can anyone here confirm that you can't prevent CSRF without a server side session? Or point me towards a good resource.
Could you use a cookie based encrypted session that include a session id?
I guess my goal would be to not worry about replicating the session once i have more than one server
usually it's a question of using a session store other than the in-memory store
jwt is a decent way for a client to prove which session id it owns
yeah, i assume you mean like redis. was hoping to not do that, but if that's the way, so be it.
sure, you can even use postgres or something depending on load - pretty much any shared data store that all the servers can use
yep, i've done that before with the db. Didn't know if someone found a better way by now. thanks.
i am trying to make this work with reagent and cljs https://codepen.io/AngelaVelasquez/pen/Eypnq it doesnt work. recreated html structure with reagent and then just copying css am i making the error or cljs/reagent dont work with some css rules ?
this might be a dumb question: when using boot-cljs, why do I need to name all my namespaces in module.cljs.edn file under :require
it works without it, at least in development
@roklenarcic You don't need to
why did the modern cljs tutorial insist, that any new namespace has to be included in that vector?
is it ok if I just put in my main namespace?
No idea. Yes, it should usually include just the main namespace. Or with Boot-cljs 2.1+ you don't need to use :require
and you can just use :main
like with other tooling.
perhaps it affects boot.reload?
second dumb question, when I run my "production" build, my target folder includes a bunch of stuff that is byproduct of compilation, i.e. besides the 500kB main js, it also includes all libraries, instead of generate .css file, it also includes all the .scss sources
and I kinda want a clean output to package up
seems like boot filesets is just everything thrown together
@roklenarcic Boot-cljs by default includes the compiler output in fileset without output role, (kind of bad default, it will probably get option later to change this), you can use sift
task to filter the fileset (`:include` and :invert
options). .scss
files you can remove from the output by moving them from directory with output role (`:resource-paths`) to directory with only input role (`:source-paths`)
@roklenarcic Check this for fileset roles: https://github.com/boot-clj/boot/wiki/Filesets#fileset-components
Might me a silly question, but does Om-Next , reagent, re-frame etc.. fall under the React license as well since they wrap React?
aha, I thought source-paths had special meaning as in cljs, clj, cljc files only
@jhorwitz well even if they don't it's a dead library without react
like if you had a free library that uses a closed source library
As a data point: ClojureScript 1.9.521 -> 1.9.854, app size increase from 2028491 to 2059398 (1.5%). Only changes are ClojureScript version and clojure.spec to clojure.spec.alpha renaming.
I created the externs for cxApi.js and added a PR to https://github.com/cljsjs/packages. Was surprised it hadn’t been done already. I’m not sure how to package it so it can just be included as a dependency. I’m just adding it as an :externs in :compiler Let me know if there is anything I missed, this is my first externs file. @mfikes Thanks for the fast response, was able to get this working very quickly thanks to your links
@jrychter would be interested to check the differences in source-map-explorer reports: https://github.com/danvk/source-map-explorer