Skip to content
Closed
Show file tree
Hide file tree
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
Fix few issues
  • Loading branch information
bopm committed Apr 8, 2025
commit df08588547c1fce6d7e4ca0c2aaf68d651ef1452
9 changes: 7 additions & 2 deletions lib/tailwindcss/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

module Tailwindcss
class Engine < ::Rails::Engine
initializer 'tailwindcss.add_engines_roots_config' do
Rails.application.config.tailwindcss_rails.engines = []
config.before_configuration do |app|
app.config.tailwindcss_rails = ActiveSupport::OrderedOptions.new
app.config.tailwindcss_rails.engines = []
end

initializer 'tailwindcss.load_hook' do |app|
ActiveSupport.run_load_hooks(:tailwindcss_rails, app)
end

initializer "tailwindcss.disable_generator_stylesheets" do
Expand Down
4 changes: 2 additions & 2 deletions lib/tasks/build.rake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace :tailwindcss do
puts "Running: #{Shellwords.join(command)}" if verbose

system(env, *command, exception: true)
remove_tempfile!
Tailwindcss::Commands.remove_tempfile!
end

desc "Watch and build your Tailwind CSS on file changes"
Expand All @@ -27,7 +27,7 @@ namespace :tailwindcss do
rescue Interrupt
puts "Received interrupt, exiting tailwindcss:watch" if args.extras.include?("verbose")
ensure
remove_tempfile!
Tailwindcss::Commands.remove_tempfile!
end
end

Expand Down