Clojurians
#clojurescript
<
2016-07-25
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

petrus09:07:17

Is there a helper lib to render cache-busting JS file links in Hiccup, Ring or Boot? E.g. <script src="/app.js?ver={{git_sha or unix timestamp}}” ...>

petrus09:07:46

Ideally via something like (include-js “app.js” :bust-cache true), which would happen on server page generation.

dimovich12:07:13

hello fellow clojurians

dimovich12:07:29

working on developing an online radio

dimovich12:07:23

what libs would you recommend for the interface -> the colorful elipsis are animated... and when you click on any of them they get extended and some section of the page appears

cmdrdats13:07:03

hey all - I'm looking for a quick solution to 'pretty-print' clojure data structures to a foldable/explorable html for dumping onto the page, so I can see how the data changes underneath - any existing libraries that do that?

darwin13:07:28

@cmdrdats: you could do that in devtools console with cljs-devtools: https://github.com/binaryage/cljs-devtools

cmdrdats13:07:53

@darwin json-html looks almost there (though, collapsable nodes would be nice)

darwin13:07:04

if you really wanted to write custom renderer to be placed directly in your page, it should be possible to reuse cljs-devtools internals

darwin13:07:37

upcoming v0.8 will internally produce hiccup-like data structure, which can be then rendered by hand see this file: https://github.com/binaryage/cljs-devtools/blob/wip/src/lib/devtools/formatters/markup.cljs

cmdrdats13:07:56

@yogthos perfect! :slightly_smiling_face:

cmdrdats13:07:26

thanks @darwin - I'll probably look into clj-devtools down the line - need something lightweight for now

darwin13:07:26

cool, didn’t know about data-frisk

mbrum13:07:59

Some one know a lib to manipulate ODF in browser ?

peeja16:07:17

Is it possible/advisable to enable a reader conditional feature for a specific CLJS build?

peeja16:07:57

I'd like to enable certain features in my code in dev builds only, including requiring certain namespaces

bhauman16:07:13

@petrus: there is a GCL lib cal that does this, I don't know it off hand but I use it in figwheel client file reloading

mattsfrey16:07:41

Was wondering if anyone here has used re-frame/devcards and developed any successful strategies / best practices for developing components with devcards that use re-frame state?

shaun-mahood16:07:34

I'm hoping to put some time in this week to get something written up in the re-frame and devcards wikis if I can get something working with it

dnolen17:07:20

@peeja: not sure what you mean and not clear how you would accomplish that (if you mean what I think you mean)

peeja18:07:30

@dnolen: I mean: Is it possible to instruct the compiler to read my code with the feature :my-feature on?

peeja18:07:43

(from the compiler options, or something similar)

peeja18:07:58

For instance, I'd like to be able to include devcards in the same namespaces as the components they demonstrate, but strip them out entirely in production. Devcards has a macro that hides code when devcards is off, but I still have to include the devcards library in production, because I still have to require it.

alexmiller18:07:06

@peeja reader conditional features are not open - they can only be used for the platform tags

alexmiller18:07:19

:clj, :cljs etc

peeja18:07:11

Ah, okay. Why does the reader take a set of them, then?

alexmiller18:07:41

future possible expansion

alexmiller18:07:12

earlier (non-released) versions of reader conditionals did allow for custom features but we pruned things way back

peeja19:07:10

Ah, got it.