Skip to content

Commit 9fcdb45

Browse files
committed
simplify content patterns array using %w notation
1 parent 2480592 commit 9fcdb45

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

_plugins/tailwind_incremental_fix.rb

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,7 @@ class << self
2323
next if Jekyll::PostcssTrigger.css_touched
2424

2525
# Check if any HTML/Markdown files have changed
26-
content_patterns = [
27-
"_layouts/**/*.html",
28-
"_includes/**/*.html",
29-
"*.html",
30-
"*.md",
31-
"*/**/*.html",
32-
"*/**/*.md"
33-
]
26+
content_patterns = %w[_layouts/**/*.html _includes/**/*.html *.html *.md */**/*.html */**/*.md]
3427

3528
html_changed = false
3629
last_check = Jekyll::PostcssTrigger.last_check_time
@@ -39,7 +32,7 @@ class << self
3932
Dir.glob(site.in_source_dir(pattern)).each do |file|
4033
next if file.start_with?(site.dest) # Exclude _site directory
4134

42-
# Check if file was modified since last check
35+
# Check if a file was modified since the last check
4336
if File.exist?(file) && File.mtime(file) > last_check
4437
html_changed = true
4538
Jekyll.logger.info "PostCSS Trigger:", "Detected change in #{File.basename(file)}"

0 commit comments

Comments
 (0)