lib/rails/generators/channel/channel_generator.rb in actioncable-7.1.5 vs lib/rails/generators/channel/channel_generator.rb in actioncable-7.2.0.beta1

- old
+ new

@@ -1,7 +1,9 @@ # frozen_string_literal: true +# :markup: markdown + module Rails module Generators class ChannelGenerator < NamedBase source_root File.expand_path("templates", __dir__) @@ -101,11 +103,11 @@ def using_js_runtime? @using_js_runtime ||= root.join("package.json").exist? end def using_bun? - # Cannot assume bun.lockb has been generated yet so we look for - # a file known to be generated by the jsbundling-rails gem + # Cannot assume bun.lockb has been generated yet so we look for a file known to + # be generated by the jsbundling-rails gem @using_bun ||= using_js_runtime? && root.join("bun.config.js").exist? end def using_node? # Bun is the only runtime that _isn't_ node.