lib/install/phlex.rb in phlex-0.4.0 vs lib/install/phlex.rb in phlex-0.5.0
- old
+ new
@@ -18,13 +18,22 @@
unless Rails.root.join("app/views/application_view.rb").exist?
create_file(Rails.root.join("app/views/application_view.rb"), <<~RUBY)
# frozen_string_literal: true
module Views
- class ApplicationView < Phlex::View
+ module ApplicationView
include Rails.application.routes.url_helpers
+ include Phlex::Translation
end
end
RUBY
+end
+
+tailwind_config_path = Rails.root.join("config/tailwind.config.js")
+
+if tailwind_config_path.exist?
+ insert_into_file tailwind_config_path, after: "content: [" do
+ "\n './app/views/**/*.rb',"
+ end
end
say "Phlex successfully installed!"