Fork me on GitHub
#off-topic
<
2018-03-12
>
deg14:03:26

Is there anything like Hiccup in the Javascript ecosystem? I need to do a small job in Javascript, and am feeling the lack. I don't want a mustache-like templating language. I want something, like Hiccup where I can pass in a JSON data structure and get back an HTML string.

Olical14:03:07

https://github.com/coderofsalvation/json-dsl might do the trick, although I've never ever used anything in JS that works on the data -> DOM idea. Other than React.

Olical14:03:19

It doesn't appear to be a very common practice in JS.

sundarj14:03:33

i've written a hiccup-like DSL over Hyperscript before

deg14:03:08

Thanks. Looking at both now.

deg14:03:47

json-dsl errs immediately. And, even if I get past that, it doesn't look like its syntax preserves the order of subexpressions. Sigh. Hypertext looks more interesting. Doesn't do everything I need, but looks like I can build on it straightforwardly.

deg15:03:06

Wow. looks interesting.

Matt Grimm19:03:57

Hickory supposedly supports cljs, though I have only used it in clj: https://github.com/davidsantiago/hickory

deg12:03:56

Thanks. But, sadly, I was looking for a tool for JavaScript. (Meanwhile, it looks like thi-ng/umbrella/hiccup will do what I need).

rauh15:03:19

(Checkout the test/ dir)

Chad Morrow20:03:25

Hey all, I put this Clojure Slack theme together just now and thought I’d share in case anyone was interested. I pulled the colors from the clojure website.

Chad Morrow20:03:26

#0C2341,#5182D5,#8CB5FB,#FFFFFF,#5182D5,#FFFFFF,#5FB13E,#F35A9F

seancorfield22:03:19

@chad.b.morrow Cool! Here's the theme I've been using for a few years, also based on the Clojure logo colors. Looks like yours is a dark theme and mine's a light theme? #FFFFFF ,#90B4FE ,#E4EAF7 ,#4C5770 ,#C4C4C4 ,#272727 ,#91DC47 ,#63B132

eggsyntax22:03:11

HA! Switched 🙂

Chad Morrow22:03:21

oh nice! I was thinking of doing a light theme but got distracted working on a theme for the Rust lang slack >.>

Chad Morrow22:03:24

i like yours!