lib/generators/quilt/install_generator.rb in quilt_rails-1.7.0 vs lib/generators/quilt/install_generator.rb in quilt_rails-1.8.0

- old
+ new

@@ -6,10 +6,27 @@ desc "This generator mounts the Quilt engine and adds a React app." def install_js_dependencies say "Installing @shopify/react-server and @shopify/sewing-kit dependencies" - system("yarn add @shopify/sewing-kit @shopify/react-server") unless Rails.env.test? + system("yarn add "\ + "@shopify/sewing-kit "\ + "@shopify/react-server "\ + "typescript "\ + "react "\ + "react-dom "\ + "@types/react "\ + "@types/react-dom") unless Rails.env.test? + end + + def create_tsconfig + tsconfig_path = "tsconfig.json" + + unless File.exist?(tsconfig_path) + copy_file "tsconfig.json", tsconfig_path + + log(tsconfig_path, 'wrote') + end end def create_app_file app_path = "app/ui/index.tsx"