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
24
24
25
25
def install_command
26
26
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' )
28
29
raise "jsbundling-rails: No suitable tool found for installing JavaScript dependencies"
29
30
end
30
31
31
32
def build_command
32
33
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' )
34
36
raise "jsbundling-rails: No suitable tool found for building JavaScript"
35
37
end
36
38
You can’t perform that action at this time.
0 commit comments