This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-26
Channels
- # announcements (4)
- # babashka (8)
- # beginners (75)
- # calva (26)
- # cider (33)
- # circleci (5)
- # clojure (36)
- # clojure-dev (2)
- # clojure-europe (25)
- # clojure-nl (4)
- # clojure-spec (38)
- # clojure-uk (47)
- # clojurescript (15)
- # cloverage (2)
- # conjure (64)
- # core-async (41)
- # cursive (13)
- # data-science (2)
- # datalog (16)
- # datascript (22)
- # datomic (9)
- # duct (2)
- # emacs (81)
- # figwheel-main (1)
- # fulcro (4)
- # jobs (2)
- # jobs-discuss (29)
- # kaocha (3)
- # meander (11)
- # membrane (21)
- # off-topic (1)
- # portal (1)
- # re-frame (1)
- # reitit (1)
- # releases (2)
- # remote-jobs (31)
- # shadow-cljs (26)
- # specter (5)
- # sql (26)
- # tools-deps (19)
- # vim (12)
Am I missing other approaches? Perhaps there's a way to detect if cljs-devtools is installed.
you can probably check devtools.debug/*initialized*
, https://github.com/binaryage/cljs-devtools/blob/7ace48cf25b89e3d3c37d99b623fa274a5d45c0f/src/debug/devtools/debug.cljs#L14
the hijack-console!
also replaces the original console. there's probably a way to detect that the current console is a clojure fn or that the console function is different from the original
thanks @smith.adriane i'll give that a try
@lilactown using js/console.log with regular clojure data types produces verbose/unreadable strings
Today's job is a react native app. It's not always convenient to turn cljs-devtools on (e.g. two simulators) and it's helpful to look in the simulator logs sometimes (no cljs-devtool rendering).
Generally it'd be nice to log in a way which is release friendly (e.g. the pr-str wrapper) but still have the option to drill into data when debugging.
Does anyone have experience with the cljs.analyzer
and cljs.spec.alpha
?
I am trying to run codox
on a shadow-cljs
ClojureScript project, codox
internally uses cljs.analyzer
and my it is failing on statements whenever I use cljs.spec.alpha/assert
saying it can't find:
Caused by: clojure.lang.ExceptionInfo: Unable to resolve var: *runtime-asserts* in this context at line 21 src/a.cljs {:file "src/a.cljs", :line 21, :column 3, :tag :cljs/analysis-error}
A more general question, what does everyone use to generate API documentation for their ClojureScript projects?
I ended up cheating and changed my cljs.spec.alpha/assert
to cljs.spec.alpha/assert*
even though it said not to use it.
I'm having a hard time defining a macro in ClojureScript. I'm following https://code.thheller.com/blog/shadow-cljs/2019/10/12/clojurescript-macros.html from theller, and I've got it working with trival macros like:
(defmacro defstory [title & story-vecs]
title)