File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -24,13 +24,15 @@ module Jsbundling
2424
2525 def install_command
2626 return "bun install" if File . exist? ( 'bun.lockb' ) || ( tool_exists? ( 'bun' ) && !File . exist? ( 'yarn.lock' ) )
27- return "yarn install" if File . exist? ( 'yarn.lock' ) || tool_exists? ( 'yarn' )
27+ return "yarn install" if File . exist? ( 'yarn.lock' ) || ( tool_exists? ( 'yarn' ) && !File . exist? ( 'package-lock.json' ) )
28+ return "npm install" if File . exist? ( 'package-lock.json' ) || tool_exists? ( 'npm' )
2829 raise "jsbundling-rails: No suitable tool found for installing JavaScript dependencies"
2930 end
3031
3132 def build_command
3233 return "bun run build" if File . exist? ( 'bun.lockb' ) || ( tool_exists? ( 'bun' ) && !File . exist? ( 'yarn.lock' ) )
33- return "yarn build" if File . exist? ( 'yarn.lock' ) || tool_exists? ( 'yarn' )
34+ return "yarn build" if File . exist? ( 'yarn.lock' ) || ( tool_exists? ( 'yarn' ) && !File . exist? ( 'package-lock.json' ) )
35+ return "npm run build" if File . exist? ( 'package-lock.json' ) || tool_exists? ( 'npm' )
3436 raise "jsbundling-rails: No suitable tool found for building JavaScript"
3537 end
3638
You can’t perform that action at this time.
0 commit comments