This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-20
Channels
- # announcements (10)
- # aws (4)
- # babashka (71)
- # beginners (30)
- # calva (61)
- # cherry (1)
- # cider (16)
- # clj-kondo (3)
- # clj-on-windows (4)
- # cljsrn (1)
- # clojure (28)
- # clojure-austin (2)
- # clojure-bay-area (1)
- # clojure-europe (45)
- # clojure-hungary (1)
- # clojure-nl (1)
- # clojure-norway (26)
- # clojure-sweden (14)
- # clojure-uk (11)
- # clojurescript (39)
- # core-async (3)
- # core-typed (11)
- # datomic (68)
- # fulcro (7)
- # keechma (1)
- # lsp (29)
- # malli (5)
- # off-topic (57)
- # other-languages (13)
- # pathom (4)
- # rdf (7)
- # reagent (7)
- # reitit (6)
- # releases (1)
- # schema (8)
- # shadow-cljs (86)
- # sql (22)
- # squint (1)
- # vim (8)
- # xtdb (12)
@U03PYN9FG77 I think for html minifiers you should look at the JS ecosystem probably. e.g. https://www.npmjs.com/package/html-minifier-terser
I saw that bootleg had recently (March) added a compress-html function but it is not yet in latest release!
I'm trying to make a utility that converts html to pretty hiccup (to integrate it into my editor), so far I have something in the lines of:
(ns html2hiccup
(:require [babashka.pods :as pods]
[babashka.deps :as deps]
[clojure.string :as str]))
(pods/load-pod 'retrogradeorbit/bootleg "0.1.9")
(deps/add-deps '{:deps {zprint/zprint {:mvn/version "1.2.4"}}})
(deps/add-deps '{:deps {org.babashka/spec.alpha {:git/url ""
:git/sha "1a841c4cc1d4f6dab7505a98ed2d532dd9d56b78"}}})
(require '[pod.retrogradeorbit.bootleg.utils :refer [convert-to]]
'[zprint.core :refer [zprint]])
(-> *in*
slurp
(convert-to :hiccup-seq)
(zprint {:style :hiccup}))