From 6ab0eb1be0532fbc17f75a644249c7bfa18bacda Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Fri, 4 Oct 2024 17:08:16 -0400 Subject: [PATCH 1/4] Move files we want to share between js and ts to the shared files-override folder --- files-override/{js => shared}/.gitignore | 0 {files/js => files-override/shared}/app/config/environment.js | 0 files-override/{js => shared}/ember-cli-build.js | 0 {files/js => files-override/shared}/index.html | 0 files-override/{js => shared}/testem.js | 0 files-override/{js => shared}/tests/index.html | 0 {files/js => files-override/shared}/vite.config.mjs | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename files-override/{js => shared}/.gitignore (100%) rename {files/js => files-override/shared}/app/config/environment.js (100%) rename files-override/{js => shared}/ember-cli-build.js (100%) rename {files/js => files-override/shared}/index.html (100%) rename files-override/{js => shared}/testem.js (100%) rename files-override/{js => shared}/tests/index.html (100%) rename {files/js => files-override/shared}/vite.config.mjs (100%) diff --git a/files-override/js/.gitignore b/files-override/shared/.gitignore similarity index 100% rename from files-override/js/.gitignore rename to files-override/shared/.gitignore diff --git a/files/js/app/config/environment.js b/files-override/shared/app/config/environment.js similarity index 100% rename from files/js/app/config/environment.js rename to files-override/shared/app/config/environment.js diff --git a/files-override/js/ember-cli-build.js b/files-override/shared/ember-cli-build.js similarity index 100% rename from files-override/js/ember-cli-build.js rename to files-override/shared/ember-cli-build.js diff --git a/files/js/index.html b/files-override/shared/index.html similarity index 100% rename from files/js/index.html rename to files-override/shared/index.html diff --git a/files-override/js/testem.js b/files-override/shared/testem.js similarity index 100% rename from files-override/js/testem.js rename to files-override/shared/testem.js diff --git a/files-override/js/tests/index.html b/files-override/shared/tests/index.html similarity index 100% rename from files-override/js/tests/index.html rename to files-override/shared/tests/index.html diff --git a/files/js/vite.config.mjs b/files-override/shared/vite.config.mjs similarity index 100% rename from files/js/vite.config.mjs rename to files-override/shared/vite.config.mjs From a9357674116d95fcbf30d53942d0bbb886eaac57 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Fri, 4 Oct 2024 17:15:30 -0400 Subject: [PATCH 2/4] Prettier bug related to quoting, I think -- we don't want double quotes in the vite.config.mjs --- files-override/shared/.prettierrc.cjs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/files-override/shared/.prettierrc.cjs b/files-override/shared/.prettierrc.cjs index 6197eb1..0df5847 100644 --- a/files-override/shared/.prettierrc.cjs +++ b/files-override/shared/.prettierrc.cjs @@ -2,6 +2,7 @@ module.exports = { plugins: ['prettier-plugin-ember-template-tag'], + singleQuote: true, overrides: [ { files: ['*.js', '*.ts', '*.cjs', '.mjs', '.cts', '.mts', '.cts'], @@ -10,6 +11,12 @@ module.exports = { trailingComma: 'es5', }, }, + { + files: ['*.html'], + options: { + singleQuote: false, + }, + }, { files: ['*.json'], options: { From 23844d2d1d8f57b69fd10315df69f97150638e30 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Fri, 4 Oct 2024 17:22:30 -0400 Subject: [PATCH 3/4] Be sure to run copyWithTemplate on the shared directory --- index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.js b/index.js index dcd1d2d..2a1b5d8 100644 --- a/index.js +++ b/index.js @@ -112,6 +112,12 @@ module.exports = { // there doesn't seem to be a way to tell ember-cli to not prompt to override files that were added in the beforeInstall // so I'm just copying a few over at this stage + copyWithTemplate( + join(__dirname, 'files-override/shared'), + options.target, + options, + ); + copyWithTemplate( join(__dirname, 'files-override/js'), options.target, From 39dec37a73a4383c9db55ec00e73f282a1485c2d Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Mon, 7 Oct 2024 07:52:58 -0400 Subject: [PATCH 4/4] Update .prettierrc.cjs --- files-override/shared/.prettierrc.cjs | 2 -- 1 file changed, 2 deletions(-) diff --git a/files-override/shared/.prettierrc.cjs b/files-override/shared/.prettierrc.cjs index 0df5847..dc136b2 100644 --- a/files-override/shared/.prettierrc.cjs +++ b/files-override/shared/.prettierrc.cjs @@ -7,7 +7,6 @@ module.exports = { { files: ['*.js', '*.ts', '*.cjs', '.mjs', '.cts', '.mts', '.cts'], options: { - singleQuote: true, trailingComma: 'es5', }, }, @@ -32,7 +31,6 @@ module.exports = { { files: ['*.gjs', '*.gts'], options: { - singleQuote: true, templateSingleQuote: false, trailingComma: 'es5', },