Skip to content

Commit

Permalink
Consider a broader set of files as content during CSS compile
Browse files Browse the repository at this point in the history
  • Loading branch information
zampino committed Oct 19, 2023
1 parent 28635cf commit dd33c65
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 1 addition & 3 deletions resources/stylesheets/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module.exports = {
darkMode: "class",
content: ["./tw/**/*.{txt,js,md,clj,cljc,cljs}",
"./src/**.{clj,cljc,cljs}",
"./notebooks/**.{clj,cljc,md}"],
content: ["./**.{txt,md,clj,cljc,cljs}"],
safelist: ['dark'],
theme: {
extend: {},
Expand Down
12 changes: 7 additions & 5 deletions src/nextjournal/clerk/render/hashing.clj
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@
;; NOTE: a .cjs extension is safer in case the current npm project is of type module (like Clerk's): in this case all .js files
;; are treated as ES modules and this is not the case of our tw config.
(shell "yarn install")
(shell "yarn tailwindcss"
"--input" (str (resource-path "stylesheets/viewer.css"))
"--config" (str (resource-path "stylesheets/tailwind.config.js"))
"--output" dest-file
"--minify"))
(println "Compiling CSS…")
(time
(shell "yarn tailwindcss"
"--input" (str (resource-path "stylesheets/viewer.css"))
"--config" (str (resource-path "stylesheets/tailwind.config.js"))
"--output" dest-file
"--minify")))

#_ (compile-css! "compiled-viewer.css")

Expand Down

0 comments on commit dd33c65

Please sign in to comment.