Class: HotwireDebug::WebpackerGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- HotwireDebug::WebpackerGenerator
- Defined in:
- lib/generators/hotwire_debug/webpacker/webpacker_generator.rb
Instance Method Summary collapse
Instance Method Details
#append_imports ⇒ Object
8 9 10 11 |
# File 'lib/generators/hotwire_debug/webpacker/webpacker_generator.rb', line 8 def append_imports inject_into_file 'app/javascript/packs/application.js', "\nimport '../vendor/hotwire-debug';\n" inject_into_file 'app/javascript/stylesheets/application.scss', "\n@import '../vendor/hotwire-debug';\n" end |
#copy_assets ⇒ Object
4 5 6 7 |
# File 'lib/generators/hotwire_debug/webpacker/webpacker_generator.rb', line 4 def copy_assets template "hotwire-debug.js", "app/javascript/vendor/hotwire-debug.js" template "hotwire-debug.scss", "app/javascript/vendor/hotwire-debug.scss" end |