From a0e35f9a52e1650c355b2dcbe1bb98c24d9a7acb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Mino?= Date: Sun, 25 Aug 2024 14:09:48 +0200 Subject: [PATCH] refactor(react-core): move resources to a dedicated client/react/core directory --- .../react/core/domain/ReactCoreModulesFactory.java | 2 +- .../generator/client/react/{ => core}/.eslintrc.cjs | 0 .../client/react/{ => core}/postcss.config.js | 0 .../webapp/app/common/primary/app/App.css.mustache | 0 .../webapp/app/common/primary/app/App.tsx.mustache | 0 .../app/common/primary/app/LoginApp.tsx.mustache | 0 .../webapp/app/common/services/storage.ts.mustache | 0 .../src/main/webapp/app/index.css.mustache | 0 .../src/main/webapp/app/index.tsx.mustache | 0 .../app/login/primary/loginForm/index.tsx.mustache | 0 .../primary/loginModal/EyeFilledIcon.tsx.mustache | 0 .../loginModal/EyeSlashFilledIcon.tsx.mustache | 0 .../primary/loginModal/LoginModal.scss.mustache | 0 .../app/login/primary/loginModal/index.tsx.mustache | 0 .../primary/loginModal/interface.d.ts.mustache | 0 .../webapp/app/login/services/login.ts.mustache | 0 .../src/main/webapp/app/vite-env.d.ts.mustache | 0 .../main/webapp/assets/JHipster-Lite-neon-blue.png | Bin .../{ => core}/src/main/webapp/assets/ReactLogo.png | Bin .../{ => core}/src/main/webapp/index.html.mustache | 0 .../unit/common/primary/app/App.spec.tsx.mustache | 0 .../unit/common/primary/app/App.test.tsx.mustache | 0 .../unit/common/services/storage.test.ts.mustache | 0 .../login/primary/loginForm/index.test.tsx.mustache | 0 .../primary/loginModal/index.test.tsx.mustache | 0 .../unit/login/services/login.test.ts.mustache | 0 .../client/react/{ => core}/tailwind.config.js | 0 .../generator/client/react/{ => core}/tsconfig.json | 4 ++-- .../client/react/{ => core}/vite.config.ts.mustache | 0 .../react/{ => core}/vitest.config.ts.mustache | 0 30 files changed, 3 insertions(+), 3 deletions(-) rename src/main/resources/generator/client/react/{ => core}/.eslintrc.cjs (100%) rename src/main/resources/generator/client/react/{ => core}/postcss.config.js (100%) rename src/main/resources/generator/client/react/{ => core}/src/main/webapp/app/common/primary/app/App.css.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/src/main/webapp/app/common/primary/app/App.tsx.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/src/main/webapp/app/common/primary/app/LoginApp.tsx.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/src/main/webapp/app/common/services/storage.ts.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/src/main/webapp/app/index.css.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/src/main/webapp/app/index.tsx.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/src/main/webapp/app/login/primary/loginForm/index.tsx.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/src/main/webapp/app/login/primary/loginModal/EyeFilledIcon.tsx.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/src/main/webapp/app/login/primary/loginModal/EyeSlashFilledIcon.tsx.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/src/main/webapp/app/login/primary/loginModal/LoginModal.scss.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/src/main/webapp/app/login/primary/loginModal/index.tsx.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/src/main/webapp/app/login/primary/loginModal/interface.d.ts.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/src/main/webapp/app/login/services/login.ts.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/src/main/webapp/app/vite-env.d.ts.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/src/main/webapp/assets/JHipster-Lite-neon-blue.png (100%) rename src/main/resources/generator/client/react/{ => core}/src/main/webapp/assets/ReactLogo.png (100%) rename src/main/resources/generator/client/react/{ => core}/src/main/webapp/index.html.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/src/test/webapp/unit/common/primary/app/App.spec.tsx.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/src/test/webapp/unit/common/primary/app/App.test.tsx.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/src/test/webapp/unit/common/services/storage.test.ts.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/src/test/webapp/unit/login/primary/loginForm/index.test.tsx.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/src/test/webapp/unit/login/primary/loginModal/index.test.tsx.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/src/test/webapp/unit/login/services/login.test.ts.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/tailwind.config.js (100%) rename src/main/resources/generator/client/react/{ => core}/tsconfig.json (77%) rename src/main/resources/generator/client/react/{ => core}/vite.config.ts.mustache (100%) rename src/main/resources/generator/client/react/{ => core}/vitest.config.ts.mustache (100%) diff --git a/src/main/java/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactory.java b/src/main/java/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactory.java index 7d1acad0607..1ea8a003e5a 100644 --- a/src/main/java/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactory.java +++ b/src/main/java/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactory.java @@ -11,7 +11,7 @@ public class ReactCoreModulesFactory { - private static final JHipsterSource SOURCE = from("client/react"); + private static final JHipsterSource SOURCE = from("client/react/core"); private static final JHipsterSource SOURCE_COMMON = from("client/common"); private static final JHipsterSource WEBAPP_SOURCE = SOURCE.append("src/main/webapp"); diff --git a/src/main/resources/generator/client/react/.eslintrc.cjs b/src/main/resources/generator/client/react/core/.eslintrc.cjs similarity index 100% rename from src/main/resources/generator/client/react/.eslintrc.cjs rename to src/main/resources/generator/client/react/core/.eslintrc.cjs diff --git a/src/main/resources/generator/client/react/postcss.config.js b/src/main/resources/generator/client/react/core/postcss.config.js similarity index 100% rename from src/main/resources/generator/client/react/postcss.config.js rename to src/main/resources/generator/client/react/core/postcss.config.js diff --git a/src/main/resources/generator/client/react/src/main/webapp/app/common/primary/app/App.css.mustache b/src/main/resources/generator/client/react/core/src/main/webapp/app/common/primary/app/App.css.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/main/webapp/app/common/primary/app/App.css.mustache rename to src/main/resources/generator/client/react/core/src/main/webapp/app/common/primary/app/App.css.mustache diff --git a/src/main/resources/generator/client/react/src/main/webapp/app/common/primary/app/App.tsx.mustache b/src/main/resources/generator/client/react/core/src/main/webapp/app/common/primary/app/App.tsx.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/main/webapp/app/common/primary/app/App.tsx.mustache rename to src/main/resources/generator/client/react/core/src/main/webapp/app/common/primary/app/App.tsx.mustache diff --git a/src/main/resources/generator/client/react/src/main/webapp/app/common/primary/app/LoginApp.tsx.mustache b/src/main/resources/generator/client/react/core/src/main/webapp/app/common/primary/app/LoginApp.tsx.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/main/webapp/app/common/primary/app/LoginApp.tsx.mustache rename to src/main/resources/generator/client/react/core/src/main/webapp/app/common/primary/app/LoginApp.tsx.mustache diff --git a/src/main/resources/generator/client/react/src/main/webapp/app/common/services/storage.ts.mustache b/src/main/resources/generator/client/react/core/src/main/webapp/app/common/services/storage.ts.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/main/webapp/app/common/services/storage.ts.mustache rename to src/main/resources/generator/client/react/core/src/main/webapp/app/common/services/storage.ts.mustache diff --git a/src/main/resources/generator/client/react/src/main/webapp/app/index.css.mustache b/src/main/resources/generator/client/react/core/src/main/webapp/app/index.css.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/main/webapp/app/index.css.mustache rename to src/main/resources/generator/client/react/core/src/main/webapp/app/index.css.mustache diff --git a/src/main/resources/generator/client/react/src/main/webapp/app/index.tsx.mustache b/src/main/resources/generator/client/react/core/src/main/webapp/app/index.tsx.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/main/webapp/app/index.tsx.mustache rename to src/main/resources/generator/client/react/core/src/main/webapp/app/index.tsx.mustache diff --git a/src/main/resources/generator/client/react/src/main/webapp/app/login/primary/loginForm/index.tsx.mustache b/src/main/resources/generator/client/react/core/src/main/webapp/app/login/primary/loginForm/index.tsx.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/main/webapp/app/login/primary/loginForm/index.tsx.mustache rename to src/main/resources/generator/client/react/core/src/main/webapp/app/login/primary/loginForm/index.tsx.mustache diff --git a/src/main/resources/generator/client/react/src/main/webapp/app/login/primary/loginModal/EyeFilledIcon.tsx.mustache b/src/main/resources/generator/client/react/core/src/main/webapp/app/login/primary/loginModal/EyeFilledIcon.tsx.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/main/webapp/app/login/primary/loginModal/EyeFilledIcon.tsx.mustache rename to src/main/resources/generator/client/react/core/src/main/webapp/app/login/primary/loginModal/EyeFilledIcon.tsx.mustache diff --git a/src/main/resources/generator/client/react/src/main/webapp/app/login/primary/loginModal/EyeSlashFilledIcon.tsx.mustache b/src/main/resources/generator/client/react/core/src/main/webapp/app/login/primary/loginModal/EyeSlashFilledIcon.tsx.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/main/webapp/app/login/primary/loginModal/EyeSlashFilledIcon.tsx.mustache rename to src/main/resources/generator/client/react/core/src/main/webapp/app/login/primary/loginModal/EyeSlashFilledIcon.tsx.mustache diff --git a/src/main/resources/generator/client/react/src/main/webapp/app/login/primary/loginModal/LoginModal.scss.mustache b/src/main/resources/generator/client/react/core/src/main/webapp/app/login/primary/loginModal/LoginModal.scss.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/main/webapp/app/login/primary/loginModal/LoginModal.scss.mustache rename to src/main/resources/generator/client/react/core/src/main/webapp/app/login/primary/loginModal/LoginModal.scss.mustache diff --git a/src/main/resources/generator/client/react/src/main/webapp/app/login/primary/loginModal/index.tsx.mustache b/src/main/resources/generator/client/react/core/src/main/webapp/app/login/primary/loginModal/index.tsx.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/main/webapp/app/login/primary/loginModal/index.tsx.mustache rename to src/main/resources/generator/client/react/core/src/main/webapp/app/login/primary/loginModal/index.tsx.mustache diff --git a/src/main/resources/generator/client/react/src/main/webapp/app/login/primary/loginModal/interface.d.ts.mustache b/src/main/resources/generator/client/react/core/src/main/webapp/app/login/primary/loginModal/interface.d.ts.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/main/webapp/app/login/primary/loginModal/interface.d.ts.mustache rename to src/main/resources/generator/client/react/core/src/main/webapp/app/login/primary/loginModal/interface.d.ts.mustache diff --git a/src/main/resources/generator/client/react/src/main/webapp/app/login/services/login.ts.mustache b/src/main/resources/generator/client/react/core/src/main/webapp/app/login/services/login.ts.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/main/webapp/app/login/services/login.ts.mustache rename to src/main/resources/generator/client/react/core/src/main/webapp/app/login/services/login.ts.mustache diff --git a/src/main/resources/generator/client/react/src/main/webapp/app/vite-env.d.ts.mustache b/src/main/resources/generator/client/react/core/src/main/webapp/app/vite-env.d.ts.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/main/webapp/app/vite-env.d.ts.mustache rename to src/main/resources/generator/client/react/core/src/main/webapp/app/vite-env.d.ts.mustache diff --git a/src/main/resources/generator/client/react/src/main/webapp/assets/JHipster-Lite-neon-blue.png b/src/main/resources/generator/client/react/core/src/main/webapp/assets/JHipster-Lite-neon-blue.png similarity index 100% rename from src/main/resources/generator/client/react/src/main/webapp/assets/JHipster-Lite-neon-blue.png rename to src/main/resources/generator/client/react/core/src/main/webapp/assets/JHipster-Lite-neon-blue.png diff --git a/src/main/resources/generator/client/react/src/main/webapp/assets/ReactLogo.png b/src/main/resources/generator/client/react/core/src/main/webapp/assets/ReactLogo.png similarity index 100% rename from src/main/resources/generator/client/react/src/main/webapp/assets/ReactLogo.png rename to src/main/resources/generator/client/react/core/src/main/webapp/assets/ReactLogo.png diff --git a/src/main/resources/generator/client/react/src/main/webapp/index.html.mustache b/src/main/resources/generator/client/react/core/src/main/webapp/index.html.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/main/webapp/index.html.mustache rename to src/main/resources/generator/client/react/core/src/main/webapp/index.html.mustache diff --git a/src/main/resources/generator/client/react/src/test/webapp/unit/common/primary/app/App.spec.tsx.mustache b/src/main/resources/generator/client/react/core/src/test/webapp/unit/common/primary/app/App.spec.tsx.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/test/webapp/unit/common/primary/app/App.spec.tsx.mustache rename to src/main/resources/generator/client/react/core/src/test/webapp/unit/common/primary/app/App.spec.tsx.mustache diff --git a/src/main/resources/generator/client/react/src/test/webapp/unit/common/primary/app/App.test.tsx.mustache b/src/main/resources/generator/client/react/core/src/test/webapp/unit/common/primary/app/App.test.tsx.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/test/webapp/unit/common/primary/app/App.test.tsx.mustache rename to src/main/resources/generator/client/react/core/src/test/webapp/unit/common/primary/app/App.test.tsx.mustache diff --git a/src/main/resources/generator/client/react/src/test/webapp/unit/common/services/storage.test.ts.mustache b/src/main/resources/generator/client/react/core/src/test/webapp/unit/common/services/storage.test.ts.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/test/webapp/unit/common/services/storage.test.ts.mustache rename to src/main/resources/generator/client/react/core/src/test/webapp/unit/common/services/storage.test.ts.mustache diff --git a/src/main/resources/generator/client/react/src/test/webapp/unit/login/primary/loginForm/index.test.tsx.mustache b/src/main/resources/generator/client/react/core/src/test/webapp/unit/login/primary/loginForm/index.test.tsx.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/test/webapp/unit/login/primary/loginForm/index.test.tsx.mustache rename to src/main/resources/generator/client/react/core/src/test/webapp/unit/login/primary/loginForm/index.test.tsx.mustache diff --git a/src/main/resources/generator/client/react/src/test/webapp/unit/login/primary/loginModal/index.test.tsx.mustache b/src/main/resources/generator/client/react/core/src/test/webapp/unit/login/primary/loginModal/index.test.tsx.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/test/webapp/unit/login/primary/loginModal/index.test.tsx.mustache rename to src/main/resources/generator/client/react/core/src/test/webapp/unit/login/primary/loginModal/index.test.tsx.mustache diff --git a/src/main/resources/generator/client/react/src/test/webapp/unit/login/services/login.test.ts.mustache b/src/main/resources/generator/client/react/core/src/test/webapp/unit/login/services/login.test.ts.mustache similarity index 100% rename from src/main/resources/generator/client/react/src/test/webapp/unit/login/services/login.test.ts.mustache rename to src/main/resources/generator/client/react/core/src/test/webapp/unit/login/services/login.test.ts.mustache diff --git a/src/main/resources/generator/client/react/tailwind.config.js b/src/main/resources/generator/client/react/core/tailwind.config.js similarity index 100% rename from src/main/resources/generator/client/react/tailwind.config.js rename to src/main/resources/generator/client/react/core/tailwind.config.js diff --git a/src/main/resources/generator/client/react/tsconfig.json b/src/main/resources/generator/client/react/core/tsconfig.json similarity index 77% rename from src/main/resources/generator/client/react/tsconfig.json rename to src/main/resources/generator/client/react/core/tsconfig.json index bbaf02392b0..0dcce600c9c 100644 --- a/src/main/resources/generator/client/react/tsconfig.json +++ b/src/main/resources/generator/client/react/core/tsconfig.json @@ -4,12 +4,12 @@ "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, "composite": false, - "baseUrl": ".", + "baseUrl": "..", "types": ["vitest/globals"], "paths": { "@/*": ["src/main/webapp/app/*"], "@assets/*": ["src/main/webapp/assets/*"] } }, - "include": ["src/main/webapp/**/*", "src/test/webapp/unit/**/*"] + "include": ["core/src/main/webapp/**/*", "core/src/test/webapp/unit/**/*"] } diff --git a/src/main/resources/generator/client/react/vite.config.ts.mustache b/src/main/resources/generator/client/react/core/vite.config.ts.mustache similarity index 100% rename from src/main/resources/generator/client/react/vite.config.ts.mustache rename to src/main/resources/generator/client/react/core/vite.config.ts.mustache diff --git a/src/main/resources/generator/client/react/vitest.config.ts.mustache b/src/main/resources/generator/client/react/core/vitest.config.ts.mustache similarity index 100% rename from src/main/resources/generator/client/react/vitest.config.ts.mustache rename to src/main/resources/generator/client/react/core/vitest.config.ts.mustache