From 1655045a990abe94d35d3923c7b9e5f5cea3ae53 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Sun, 6 Aug 2023 13:01:51 +1200 Subject: [PATCH] refactor: use `directory` instead of multiple `copy_file` calls --- variants/frontend-stimulus/template.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/variants/frontend-stimulus/template.rb b/variants/frontend-stimulus/template.rb index 13ee87d3..f7c79e3f 100644 --- a/variants/frontend-stimulus/template.rb +++ b/variants/frontend-stimulus/template.rb @@ -7,10 +7,8 @@ @hotwired/stimulus-webpack-helpers ] -copy_file "app/frontend/stimulus/controllers/hello_controller.js" -copy_file "app/frontend/stimulus/controllers/add_class_controller.js" -copy_file "app/frontend/test/stimulus/controllers/add_class_controller.test.js" -copy_file "app/frontend/test/setupExpectEachTestHasAssertions.js" +directory "app/frontend/stimulus/controllers" +directory "app/frontend/test" prepend_to_file "app/frontend/packs/application.js" do <<~EO_JS_IMPORTS