Skip to content

Commit 931001c

Browse files
committed
add postcss param
1 parent 232d6b1 commit 931001c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/tailwindcss/commands.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def compile_command(debug: false, **kwargs)
6363
"-c", Rails.root.join("config/tailwind.config.js").to_s,
6464
].tap do |command|
6565
command << "--minify" unless debug
66+
command << "--postcss" if postcss
6667
end
6768
end
6869

lib/tasks/build.rake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ namespace :tailwindcss do
22
desc "Build your Tailwind CSS"
33
task :build do |_, args|
44
debug = args.extras.include?("debug")
5-
command = Tailwindcss::Commands.compile_command(debug: debug)
5+
postcss = args.extras.include?("postcss")
6+
command = Tailwindcss::Commands.compile_command(debug: debug, postcss: postcss)
67
puts command.inspect
78
system(*command, exception: true)
89
end
@@ -11,7 +12,8 @@ namespace :tailwindcss do
1112
task :watch do |_, args|
1213
debug = args.extras.include?("debug")
1314
poll = args.extras.include?("poll")
14-
command = Tailwindcss::Commands.watch_command(debug: debug, poll: poll)
15+
postcss = args.extras.include?("postcss")
16+
command = Tailwindcss::Commands.watch_command(debug: debug, poll: poll, postcss: postcss)
1517
puts command.inspect
1618
system(*command)
1719
end

0 commit comments

Comments
 (0)