Skip to content

Commit 6e6b50e

Browse files
authored
Add PNPM support (#287)
1 parent c271a3f commit 6e6b50e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/generators/ruby_ui/javascript_utils.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ def install_js_package(package)
88
run "yarn add #{package}"
99
elsif using_npm?
1010
run "npm install #{package}"
11+
elsif using_pnpm?
12+
run "pnpm install #{package}"
1113
else
1214
say "Could not detect the package manager, you need to install '#{package}' manually", :red
1315
end
@@ -30,6 +32,8 @@ def using_importmap?
3032

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

35+
def using_pnpm? = File.exist?(Rails.root.join("pnpm-lock.yaml"))
36+
3337
def using_yarn? = File.exist?(Rails.root.join("yarn.lock"))
3438

3539
def pin_motion

0 commit comments

Comments
 (0)