Skip to content

Commit

Permalink
remove post-install action for shakapacker < v7
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangohjw committed May 21, 2024
1 parent bfff0c8 commit 0f10456
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions lib/generators/react_on_rails/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ def invoke_generators
else
invoke "react_on_rails:react_no_redux"
end

invoke "react_on_rails:adapt_for_older_shakapacker" unless using_shakapacker_7?
end

# NOTE: other requirements for existing files such as .gitignore or application.
Expand Down Expand Up @@ -95,21 +93,8 @@ def add_bin_scripts

def add_post_install_message
message = GeneratorMessages.helpful_message_after_installation
unless using_shakapacker_7?
message = message.gsub("config/shakapacker", "config/webpacker")
message = message.gsub("bin/shakapacker", "bin/webpacker")
end

GeneratorMessages.add_info(message)
end

def using_shakapacker_7?
shakapacker_gem = Gem::Specification.find_by_name("shakapacker")
shakapacker_gem.version.segments.first == 7
rescue Gem::MissingSpecError
# In case using Webpacker
false
end
end
end
end

0 comments on commit 0f10456

Please sign in to comment.