Skip to content

Commit

Permalink
Merge pull request #482 from EricGusmao/update-postcss-path
Browse files Browse the repository at this point in the history
Fix: update postcss config path to match new structure
  • Loading branch information
flavorjones authored Jan 28, 2025
2 parents 63b3788 + 51efc7f commit 09e237e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/tailwindcss/commands.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def compile_command(debug: false, **kwargs)

command << "--minify" unless (debug || rails_css_compressor?)

postcss_path = rails_root.join("config/postcss.config.js")
postcss_path = rails_root.join("postcss.config.js")
command += ["--postcss", postcss_path.to_s] if File.exist?(postcss_path)

command
Expand Down
3 changes: 1 addition & 2 deletions test/lib/tailwindcss/commands_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ def setup
assert_equal(executable, actual.first)
refute_includes(actual, "--postcss")

config_file = Rails.root.join("config/postcss.config.js")
FileUtils.mkdir_p(Rails.root.join("config"))
config_file = Rails.root.join("postcss.config.js")
FileUtils.touch(config_file)
actual = Tailwindcss::Commands.compile_command
assert_kind_of(Array, actual)
Expand Down

0 comments on commit 09e237e

Please # to comment.