Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/generators/ruby_ui/javascript_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ def install_js_package(package)
run "yarn add #{package}"
elsif using_npm?
run "npm install #{package}"
elsif using_pnpm?
run "pnpm install #{package}"
else
say "Could not detect the package manager, you need to install '#{package}' manually", :red
end
Expand All @@ -30,6 +32,8 @@ def using_importmap?

def using_npm? = File.exist?(Rails.root.join("package-lock.json"))

def using_pnpm? = File.exist?(Rails.root.join("pnpm-lock.yaml"))

def using_yarn? = File.exist?(Rails.root.join("yarn.lock"))

def pin_motion
Expand Down