Class: AmberComponent::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- AmberComponent::Generators::InstallGenerator
- Defined in:
- lib/generators/amber_component/install_generator.rb
Overview
A Rails generator which installs the ‘amber_component` library in a Rails project.
Instance Method Summary collapse
Instance Method Details
#setup ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/generators/amber_component/install_generator.rb', line 25 def setup detect_stimulus detect_styles detect_views copy_file 'application_component.rb', 'app/components/application_component.rb' copy_file 'application_component_test_case.rb', 'test/application_component_test_case.rb' append_file 'test/test_helper.rb', "require_relative 'application_component_test_case'" require_components_css_in 'app/assets/stylesheets/application.css' require_components_css_in 'app/assets/stylesheets/application.scss' require_components_css_in 'app/assets/stylesheets/application.sass' require_components_css_in 'app/assets/stylesheets/application.css.scss' require_components_css_in 'app/assets/stylesheets/application.css.sass' require_components_css_in 'app/assets/stylesheets/application.scss.sass' require_components_css_in 'app/assets/stylesheets/application.sass.scss' configure_stimulus create_initializer end |