From f3f34ce6b29fcb54c306cf4c6752f85191b1a197 Mon Sep 17 00:00:00 2001 From: Johny Ho <johny@thoughtbot.com> Date: Mon, 9 Dec 2024 21:41:01 -0500 Subject: [PATCH] wip --- .../generators/superglue/install/install_generator.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/superglue_rails/lib/generators/superglue/install/install_generator.rb b/superglue_rails/lib/generators/superglue/install/install_generator.rb index ebd8225b..1216459d 100644 --- a/superglue_rails/lib/generators/superglue/install/install_generator.rb +++ b/superglue_rails/lib/generators/superglue/install/install_generator.rb @@ -3,10 +3,17 @@ module Superglue module Generators - class InstallGenerator < Rails::Generators::Base + class InstallGenerator < Rails::Generators::NamedBase source_root File.expand_path("../templates", __FILE__) + + class_option :typescript, banner: "TYPESCRIPT", + type: :boolean, + required: false, + default: false, + desc: "Use typescript" def create_files + @use_typescript = options["typescript"] say "Copying application.js file to #{app_js_path}" copy_file "#{__dir__}/templates/js/application.js", "#{app_js_path}/application.js"