Class: Shoelace::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Shoelace::Generators::InstallGenerator
- Defined in:
- lib/generators/shoelace/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#bring_in_css ⇒ Object
8 9 10 |
# File 'lib/generators/shoelace/install_generator.rb', line 8 def bring_in_css insert_into_file "./app/assets/stylesheets/application.css", " *= require sl_styles_light.css\n", before: "*/" end |
#bring_in_js ⇒ Object
13 14 15 16 |
# File 'lib/generators/shoelace/install_generator.rb', line 13 def bring_in_js append_to_file "config/importmap.rb", "\npin \"shoelace\", to: \"https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected]/dist/shoelace.js\"" append_to_file "app/javascript/application.js", "\nimport \"shoelace\"" end |