Skip to content

Commit

Permalink
Error handling for missing tailwindcss executable (#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
mk authored Jul 24, 2023
1 parent 5be6a65 commit c93e084
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/nextjournal/clerk/builder.clj
Original file line number Diff line number Diff line change
Expand Up @@ -309,14 +309,16 @@
(str path))
(pr-str viewer)))
(let [{:as ret :keys [out err exit]}
(sh "tailwindcss"
"--input" tw-input
"--config" tw-config
;; FIXME: pass inline
;;"--content" (str tw-viewer)
;;"--content" (str tw-folder "/**/*.edn")
"--output" tw-output
"--minify")]
(try (sh "tailwindcss"
"--input" tw-input
"--config" tw-config
;; FIXME: pass inline
;;"--content" (str tw-viewer)
;;"--content" (str tw-folder "/**/*.edn")
"--output" tw-output
"--minify")
(catch java.io.IOException _
(throw (Exception. "Clerk could not find the `tailwindcss` executable. Please install it using `npm install -D tailwindcss` and try again."))))]
(println err)
(println out)
(when-not (= 0 exit)
Expand Down

0 comments on commit c93e084

Please sign in to comment.