lib/install/yarn.rb in stimulus_reflex-3.5.0.rc2 vs lib/install/yarn.rb in stimulus_reflex-3.5.0.rc3

- old
+ new

@@ -1,10 +1,10 @@ # frozen_string_literal: true require "stimulus_reflex/installer" -if !package_json.exist? +if !package_json_path.exist? say "⏩ No package.json file found. Skipping." return end @@ -34,20 +34,20 @@ drop.each do |package| json["dependencies"].delete(package) json["devDependencies"].delete(package) end - package_json.write JSON.pretty_generate(json) + package_json_path.write JSON.pretty_generate(json) system "yarn install --silent" else say "⏩ No yarn depdencies to add or remove. Skipping." end if bundler == "esbuild" && json["scripts"]["build"] != "node esbuild.config.mjs" json["scripts"]["build:default"] = json["scripts"]["build"] json["scripts"]["build"] = "node esbuild.config.mjs" - package_json.write JSON.pretty_generate(json) + package_json_path.write JSON.pretty_generate(json) say "✅ Your yarn build script has been updated to use esbuild.config.mjs" else say "⏩ Your yarn build script is already setup. Skipping." end