Skip to content

Commit

Permalink
Support for NPM
Browse files Browse the repository at this point in the history
  • Loading branch information
ksylvest committed Jan 5, 2024
1 parent 09c7279 commit d5420c6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/tasks/cssbundling/build.rake
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module Cssbundling
case tool
when :bun then "bun install"
when :yarn then "yarn install"
when :npm then "npm install"
else raise "cssbundling-rails: No suitable tool found for installing JavaScript dependencies"
end
end
Expand All @@ -33,6 +34,7 @@ module Cssbundling
case tool
when :bun then "bun run build:css"
when :yarn then "yarn build:css"
when :npm then "npm run build:css"
else raise "cssbundling-rails: No suitable tool found for building CSS"
end
end
Expand All @@ -41,8 +43,10 @@ module Cssbundling
case
when File.exist?('bun.lockb') then :bun
when File.exist?('yarn.lock') then :yarn
when File.exists('package-lock.json') then :npm
when tool_exists?('bun') then :bun
when tool_exists?('yarn') then :yarn
when tool_exists?('npm') then :npm
end
end

Expand Down

0 comments on commit d5420c6

Please sign in to comment.