From dd33c65ad9ef96c9cb7e383d3cb02689643121b7 Mon Sep 17 00:00:00 2001 From: Andrea Amantini Date: Thu, 19 Oct 2023 11:36:55 +0200 Subject: [PATCH] Consider a broader set of files as content during CSS compile --- resources/stylesheets/tailwind.config.js | 4 +--- src/nextjournal/clerk/render/hashing.clj | 12 +++++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/stylesheets/tailwind.config.js b/resources/stylesheets/tailwind.config.js index c89de9a79..a63c64097 100644 --- a/resources/stylesheets/tailwind.config.js +++ b/resources/stylesheets/tailwind.config.js @@ -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: {}, diff --git a/src/nextjournal/clerk/render/hashing.clj b/src/nextjournal/clerk/render/hashing.clj index bcc874b8d..12eb1b12a 100644 --- a/src/nextjournal/clerk/render/hashing.clj +++ b/src/nextjournal/clerk/render/hashing.clj @@ -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")