From d5420c69478c479b18d8f28ebc23a74c58687cf8 Mon Sep 17 00:00:00 2001 From: Kevin Sylvestre Date: Fri, 5 Jan 2024 13:15:24 -0800 Subject: [PATCH] Support for NPM --- lib/tasks/cssbundling/build.rake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/tasks/cssbundling/build.rake b/lib/tasks/cssbundling/build.rake index d657f4a..e035ad7 100644 --- a/lib/tasks/cssbundling/build.rake +++ b/lib/tasks/cssbundling/build.rake @@ -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 @@ -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 @@ -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