Class: Quilt::ReactAppGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Quilt::ReactAppGenerator
- Defined in:
- lib/generators/quilt/react_app/react_app_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_app_file ⇒ Object
21 22 23 |
# File 'lib/generators/quilt/react_app/react_app_generator.rb', line 21 def create_app_file copy_file("App.tsx", "app/ui/index.tsx") end |
#set_app_config_javascript_path ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/generators/quilt/react_app/react_app_generator.rb', line 9 def set_app_config_javascript_path config_path = "config/application.rb" unless File.exist?(config_path) inject_into_file( config_path, "\n config.javascript_path = \"ui\"\n", before: /^ end$/, ) end end |