Class: CodeSunset::Generators::EjectUiGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- CodeSunset::Generators::EjectUiGenerator
- Defined in:
- lib/generators/code_sunset/eject_ui/eject_ui_generator.rb
Constant Summary collapse
- UI_FILES =
{ "app/assets/javascripts/code_sunset/application.js" => "app/assets/javascripts/code_sunset/application.js", "app/assets/javascripts/code_sunset/vendor/chart.umd.min.js" => "app/assets/javascripts/code_sunset/vendor/chart.umd.min.js", "app/helpers/code_sunset/application_helper.rb" => "app/helpers/code_sunset/application_helper.rb", "app/views/layouts/code_sunset/application.html.erb" => "app/views/layouts/code_sunset/application.html.erb", "app/views/code_sunset/dashboard/index.html.erb" => "app/views/code_sunset/dashboard/index.html.erb", "app/views/code_sunset/features/index.html.erb" => "app/views/code_sunset/features/index.html.erb", "app/views/code_sunset/features/show.html.erb" => "app/views/code_sunset/features/show.html.erb", "app/views/code_sunset/removal_candidates/index.html.erb" => "app/views/code_sunset/removal_candidates/index.html.erb", "app/assets/stylesheets/code_sunset/application.css" => "app/assets/stylesheets/code_sunset/application.css" }.freeze
Instance Method Summary collapse
Instance Method Details
#copy_ui_files ⇒ Object
22 23 24 25 26 |
# File 'lib/generators/code_sunset/eject_ui/eject_ui_generator.rb', line 22 def copy_ui_files UI_FILES.each do |source, destination| copy_file source, destination end end |
#show_next_steps ⇒ Object
28 29 30 |
# File 'lib/generators/code_sunset/eject_ui/eject_ui_generator.rb', line 28 def show_next_steps say_status :ejected, "Host app copies now override the engine UI. Customize them freely and mount the engine anywhere you like.", :green end |