Skip to content

Commit

Permalink
fix: explicitly set our preferred package manager for js dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Jan 25, 2024
1 parent 89c633c commit 03b5cd1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions variants/frontend-base/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
# this will create a package.json for us
run "rails shakapacker:install"

# explicitly set our preferred package manager for external tooling
File.write(
"./package.json",
JSON.generate(
JSON.load_file("./package.json").tap do |package_json|
package_json["packageManager"] = "[email protected]"
end
)
)

# this is added by shakapacker:install, but we've already got one (with some extra tags)
# in our template, so remove theirs otherwise the app will error when rendering this
gsub_file "app/views/layouts/application.html.erb",
Expand Down

0 comments on commit 03b5cd1

Please sign in to comment.