swatchbuckler.clj (1461B)
1 (ns swatchbuckler 2 (:require [core])) 3 4 (def domain "swatchbuckler.massi.world") 5 (def p (core/mk-path-fns domain identity)) 6 7 (def spec {:path ["index.html"] 8 :title "swatchbuckler" 9 :desc "generate fg/bg pairs from a midtone"}) 10 11 (defn build [_] 12 (println) 13 (core/prnt 0 "🌎" domain) 14 (time 15 (do 16 (let [templ-file "swatchbuckler/index.templ.html" 17 out-file "build/swatchbuckler.massi.world/index.html" 18 html-str (do 19 (core/prnt 1 "👉" templ-file) 20 (core/prnt 2 "🌀" "rendering " templ-file) 21 (core/fill-templ 22 (slurp templ-file) 23 {:head-content (core/massi-world-domain-stuff 24 (p :url spec) 25 p 26 spec)})) 27 html-str (do 28 (core/prnt 2 "✨" (str "tidying html...")) 29 (core/prettify-html html-str))] 30 31 (core/prnt 2 "✍" "writing " out-file) 32 (spit out-file html-str) 33 (core/prnt 2 "✅" "done!")) 34 35 (core/process-templ 36 "swatchbuckler/manifest.templ.json" 37 "build/swatchbuckler.massi.world/manifest.json" 38 {:icon-192 (p "/shared/assets/icon-192-192.png") 39 :index-url (p :url spec)}) 40 (core/prnt 1 "🤖" "wrote build/massi.world/manifest.json") 41 (print "\t 🕜\t"))) 42 (println))