Skip to content

Commit 46305c8

Browse files
committed
Support for NPM
1 parent 09c7279 commit 46305c8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/tasks/cssbundling/build.rake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ module Cssbundling
2525
case tool
2626
when :bun then "bun install"
2727
when :yarn then "yarn install"
28+
when :npm then "npm install"
2829
else raise "cssbundling-rails: No suitable tool found for installing JavaScript dependencies"
2930
end
3031
end
@@ -33,6 +34,7 @@ module Cssbundling
3334
case tool
3435
when :bun then "bun run build:css"
3536
when :yarn then "yarn build:css"
37+
when :npm then "npm run build:css"
3638
else raise "cssbundling-rails: No suitable tool found for building CSS"
3739
end
3840
end
@@ -41,8 +43,10 @@ module Cssbundling
4143
case
4244
when File.exist?('bun.lockb') then :bun
4345
when File.exist?('yarn.lock') then :yarn
46+
when File.exist?('package-lock.json') then :npm
4447
when tool_exists?('bun') then :bun
4548
when tool_exists?('yarn') then :yarn
49+
when tool_exists?('npm') then :npm
4650
end
4751
end
4852

0 commit comments

Comments
 (0)