From 85a0f1df1c66606f0ee66ff65c0d31e3f52dde46 Mon Sep 17 00:00:00 2001 From: Otto Richter Date: Sat, 24 Aug 2024 15:45:50 +0200 Subject: [PATCH] fix: Do not scan all Go files for tailwind classes Reduces some noise in the index.css file and adds a comment why it was done in the first place. --- tailwind.config.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tailwind.config.js b/tailwind.config.js index e14daf27df..7f5058a7da 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -32,11 +32,14 @@ export default { isProduction && '!./web_src/js/standalone/devtest.js', '!./templates/swagger/v1_json.tmpl', '!./templates/user/auth/oidc_wellknown.tmpl', - '!**/*_test.go', - '!./modules/{public,options,templates}/bindata.go', - './{build,models,modules,routers,services}/**/*.go', './templates/**/*.tmpl', './web_src/js/**/*.{js,vue}', + // explicitly list Go files that contain tailwind classes + 'models/avatars/avatar.go', + 'modules/markup/file_preview.go', + 'modules/markup/sanitizer.go', + 'services/auth/source/oauth2/*.go', + 'routers/web/repo/{view,blame,issue_content_history}.go', ].filter(Boolean), blocklist: [ // classes that don't work without CSS variables from "@tailwind base" which we don't use