Skip to content

Commit

Permalink
Add messages in install generator for shakapacker 6
Browse files Browse the repository at this point in the history
  • Loading branch information
ahangarha committed Jul 22, 2023
1 parent c9a6759 commit 2875265
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ module Generators
class AdaptForOlderShakapackerGenerator < Rails::Generators::Base
include GeneratorHelper
Rails::Generators.hide_namespace(namespace)
# source_root(File.expand_path("templates", __dir__))

def change_spelling_to_webpacker
puts "Change spelling to webpacker v7"
files = %w[
Procfile.dev
Procfile.dev-static
Expand All @@ -21,11 +21,13 @@ def change_spelling_to_webpacker
end

def rename_config_file
puts "Rename to config/webpacker.yml"
puts "Renaming shakapacker.yml into webpacker.yml"
FileUtils.mv("config/shakapacker.yml", "config/webpacker.yml")
end

def modify_requiring_webpack_config_in_js
puts "Update commonWebpackConfig.js to follow the Shakapacker v6 interface"
file = "config/webpack/commonWebpackConfig.js"
gsub_file(file, "const baseClientWebpackConfig = generateWebpackConfig();\n\n", "")
gsub_file(
Expand Down

0 comments on commit 2875265

Please sign in to comment.