This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-29
Channels
- # admin-announcements (1)
- # aws (10)
- # beginners (76)
- # boot (53)
- # braid-chat (1)
- # cider (80)
- # cljs-edn (3)
- # clojure (65)
- # clojure-belgium (2)
- # clojure-gamedev (2)
- # clojure-nl (3)
- # clojure-poland (1)
- # clojure-russia (39)
- # clojure-uk (14)
- # clojurescript (91)
- # cursive (62)
- # datascript (1)
- # datomic (9)
- # dirac (34)
- # emacs (25)
- # error-message-catalog (8)
- # events (1)
- # hoplon (88)
- # instaparse (1)
- # jobs (2)
- # jobs-discuss (6)
- # lein-figwheel (7)
- # luminus (43)
- # mount (5)
- # off-topic (7)
- # om (28)
- # onyx (61)
- # planck (4)
- # re-frame (27)
- # reagent (3)
- # remote-jobs (2)
- # spacemacs (3)
- # untangled (136)
@piotrek @flyboarder: +1 examples whould be great!
Folks, do we have an hoplon template with backend?
I get WARNING: update already refers to: #'clojure.core/update in namespace: clj-http.client, being replaced by: #'clj-http.client/update
running it
@leontalbot: that's an interaction between clojure 1.8 and clj-http
clojure 1.8 defines clojure.core/update
which didn't exist when that version of clj-http was written
ok, thanks!
@micha - have you looked at https://github.com/hoplon/hoplon/pull/129 at all? I've spent an hour debugging but didn't get to the root cause
in the end it boils down to javelin making a decision not to propagate where we'd really like to propagate
+ (div
+ :id "input-list"
+ (let [values (cell {})
+ values+final (cell= (into values {:new nil}))
+ on-input! (fn [id v] (reset! values (->>
+ ; Update values.
+ (merge @values {id v})
+ ; Filter empty strings.
+ (remove #(let [[_ v] %] (= "" v)))
+ ; Ensure we have a map.
+ (into {}))))]
+ (loop-tpl :bindings [[k v] values+final]
+ (let [id (cell= (if (= :new k) (gensym) k))]
+ (input
+ :value v
+ :id id
+ :input #(on-input! @id @%))))))
How do you guys handle env var in both Hoplon and Castra?
Any examples?
do you use rpc?
to pass var from server to client?
@micha! looks really neat!
thanks!
really simple
do you do (alter-var-root #'FOO (constantly "new value"))
via repl?
nice!
otherwise you end up needing something like Chef to create production config files for you
yes... So if I use adzerk-oss/env
in my/our hoplon-stripe
minimal project example, will the user manually have to boot build-jar
the lib?
if you set the CLJS_LOG_LEVEL in your environment it will pick it up when you compile your frontend
Well for now hoplon-stripe will be a project example, not a library
But anyway, looks fairly simple
@micha: would it be useful to establish some global var in browser env so you can change the log level dynamically from the browser console?
that would enable more detailed logging for customers when troubleshooting their problems
of course that would mean log calls would need to be functions checking for the value of the global level setting
and not just macros that would generate final version of the log level when generating site code
@piotrek @leontalbot at the moment you must add a link tag to your index page which pulls in semantic css (import function coming soon :P) then simply use the element functions as if they are regular hoplon elements, the namespaces map to what is on the semantic doc site (elements, views, collections, etc.) all components are provided plus a few common variations
ui components are built from the concept of semantic-ui.core/extelem
which normalizes the class list same way hoplon.core
does after adding the semantic css class names
there is probably a better more clj way of working with the class maps, so suggestions are welcome
@micha: I was thinking about not as sophisticated as airbrake but rather to be able to turn on and off debug logging in production cljs application
if a customer reports a problem I can using the same production version enable debug logging and see what happens