Sha256: 50060a8444107399e50c75100ec42c38a0a55fd97e70baf62aedb7434e91e35e
Contents?: true
Size: 724 Bytes
Versions: 4
Compression:
Stored size: 724 Bytes
Contents
# frozen_string_literal: true say "Installing Phlex..." application_configuration_path = Rails.root.join("config/application.rb") application_configuration_content = File.read(application_configuration_path) pattern = %r(config.autoload_paths << (Rails.root.join\(.app.\)|.\#{root}/app.)\n) unless application_configuration_content.match?(pattern) inject_into_class( application_configuration_path, "Application", %( config.autoload_paths << "\#{root}/app"\n) ) 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!"
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
phlex-rails-0.6.1 | lib/install/phlex.rb |
phlex-rails-0.6.0 | lib/install/phlex.rb |
phlex-rails-0.5.1 | lib/install/phlex.rb |
phlex-rails-0.5.0 | lib/install/phlex.rb |