Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Just read the first line instead of the entire file.
  • Loading branch information
delynn authored Jan 27, 2023
commit 3b4c5353195e4ec9a2a269411ddad5668b4b53ec
2 changes: 1 addition & 1 deletion lib/tailwindcss/commands.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def compile_file_command(file:, debug: false, **kwargs)
file = Pathname.new(file.to_s)
input = file
output = Rails.root.join("app/assets/builds", file.basename.sub("tailwind.", ""))
config = input.read.include?("@config") ? nil : Rails.root.join("config/tailwind.config.js")
config = input.open(&:readline).starts_with?("@config") ? nil : Rails.root.join("config/tailwind.config.js")
[
executable(**kwargs),
"-i", input.to_s,
Expand Down