From 0543b0664e18b57710eee60cecec38bec6f7c4bb Mon Sep 17 00:00:00 2001 From: Ranuga <79456372+Programmer-RD-AI@users.noreply.github.com> Date: Sat, 8 Jun 2024 21:42:10 +0530 Subject: [PATCH] Update project files for transition from Vite to Create React App This commit includes changes to several project files in order to transition from Vite to Create React App: 1. **reportWebVitals.js**: Removed file as it is not needed in Create React App setup. 2. **vite.config.js**: Removed Vite configuration file. 3. **public/robots.txt**: Removed robots.txt file. 4. **public/manifest.json**: Removed manifest.json file. 5. **public/index.html**: Updated index.html file for compatibility with Create React App setup. 6. **index.html**: Removed duplicate index.html file. 7. **.eslintrc.cjs**: Removed ESLint configuration file specific to Vite setup. These changes were made to ensure compatibility and better support for the project's development environment. --- .eslintrc.cjs | 21 --------------------- index.html | 14 -------------- public/index.html | 31 +++++++++++++++++++++++++++++++ public/manifest.json | 15 +++++++++++++++ public/robots.txt | 3 +++ src/reportWebVitals.js | 13 +++++++++++++ vite.config.js | 7 ------- 7 files changed, 62 insertions(+), 42 deletions(-) delete mode 100644 .eslintrc.cjs delete mode 100644 index.html create mode 100644 public/index.html create mode 100644 public/manifest.json create mode 100644 public/robots.txt create mode 100644 src/reportWebVitals.js delete mode 100644 vite.config.js diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index 6466c32..0000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,21 +0,0 @@ -module.exports = { - root: true, - env: { browser: true, es2020: true }, - extends: [ - "eslint:recommended", - "plugin:react/recommended", - "plugin:react/jsx-runtime", - "plugin:react-hooks/recommended", - ], - ignorePatterns: ["dist", ".eslintrc.cjs"], - parserOptions: { ecmaVersion: "latest", sourceType: "module" }, - settings: { react: { version: "18.2" } }, - plugins: ["react-refresh"], - rules: { - "react/jsx-no-target-blank": "off", - "react-refresh/only-export-components": [ - "warn", - { allowConstantExport: true }, - ], - }, -}; diff --git a/index.html b/index.html deleted file mode 100644 index b19ac1b..0000000 --- a/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - EdTract - - - -
- - - diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..bd986a9 --- /dev/null +++ b/public/index.html @@ -0,0 +1,31 @@ + + + + + + + + + + + + + EdTract + + + +
+ + diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..edd99e8 --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,15 @@ +{ + "short_name": "EdTract", + "name": "EdTract", + "icons": [ + { + "src": "logo.png", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..e9e57dc --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/src/reportWebVitals.js b/src/reportWebVitals.js new file mode 100644 index 0000000..9ecd33f --- /dev/null +++ b/src/reportWebVitals.js @@ -0,0 +1,13 @@ +const reportWebVitals = (onPerfEntry) => { + if (onPerfEntry && onPerfEntry instanceof Function) { + import("web-vitals").then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { + getCLS(onPerfEntry); + getFID(onPerfEntry); + getFCP(onPerfEntry); + getLCP(onPerfEntry); + getTTFB(onPerfEntry); + }); + } +}; + +export default reportWebVitals; diff --git a/vite.config.js b/vite.config.js deleted file mode 100644 index 861b04b..0000000 --- a/vite.config.js +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react-swc' - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [react()], -})