Sha256: e1cba20c62a5bf8fc1275cb0628e0e81a1ec09a82d6eb49cf8c509f26d8bad9c
Contents?: true
Size: 568 Bytes
Versions: 13
Compression:
Stored size: 568 Bytes
Contents
# frozen_string_literal: true module Quilt class ReactAppGenerator < Rails::Generators::Base source_root File.expand_path('templates', __dir__) desc "This generator adds a React app." 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 def create_app_file copy_file("App.tsx", "app/ui/index.tsx") end end end
Version data entries
13 entries across 13 versions & 1 rubygems