Skip to content

Commit

Permalink
fix: update postcss config path to root directory
Browse files Browse the repository at this point in the history
  • Loading branch information
EricGusmao committed Jan 28, 2025
1 parent 63b3788 commit 51efc7f
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 51efc7f

Please sign in to comment.