From 14034dba81bf3f600352d479d223390fef0edd4d Mon Sep 17 00:00:00 2001 From: root Date: Tue, 19 Mar 2024 01:26:07 +0000 Subject: [PATCH 1/8] Create initial project structure with README.md --- README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 65d521e..5074199 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,48 @@ -# pr-pilot-demo-react -A demo project showcasing PR Pilot's ability to quickly create new Django project +# PR Pilot Demo React + +This project is a React application that uses TypeScript and yarn for dependency management. It follows best practices for React development. + +## Getting Started + +To get started with this project, clone the repository and install the dependencies using yarn: + +```bash +yarn install +``` + +To run the application in development mode, use: + +```bash +yarn start +``` + +This will start the React application and open it in your default web browser. + +## Project Structure + +The project follows a structured approach to organize the codebase efficiently: + +``` +pr-pilot-demo-react/ +├── public/ +│ ├── index.html +│ └── favicon.ico +├── src/ +│ ├── components/ +│ │ └── App.tsx +│ ├── styles/ +│ │ └── App.css +│ ├── types/ +│ ├── utils/ +│ ├── index.tsx +│ └── react-app-env.d.ts +├── .gitignore +├── package.json +├── tsconfig.json +├── yarn.lock +└── README.md +``` + +## License + +This project is licensed under the MIT License - see the LICENSE file for details. \ No newline at end of file From 3760bea9db3cc5a7b919aeb34a19342791f2f3e3 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 19 Mar 2024 01:26:13 +0000 Subject: [PATCH 2/8] Add .gitignore file --- .gitignore | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7e5cab4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +# Dependencies +/node_modules + +# IDEs and editors +/.idea +*.sw* +*.log + +# OS files +.DS_Store + +# Build +/dist +/build + +# Misc +.env +.env.local +.env.development.local +.env.test.local +.env.production.local \ No newline at end of file From 31d936dd5d27facd4540b50a82ab1cf373284697 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 19 Mar 2024 01:26:34 +0000 Subject: [PATCH 3/8] Add package.json for project dependencies and scripts --- package.json | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..08ecdd7 --- /dev/null +++ b/package.json @@ -0,0 +1,35 @@ +{ + "name": "pr-pilot-demo-react", + "version": "1.0.0", + "description": "A React application using TypeScript and yarn.", + "main": "src/index.tsx", + "scripts": { + "start": "react-scripts start", + "build": "react-scripts build", + "test": "react-scripts test", + "eject": "react-scripts eject" + }, + "dependencies": { + "react": "^17.0.2", + "react-dom": "^17.0.2", + "react-scripts": "4.0.3", + "typescript": "^4.1.2" + }, + "devDependencies": { + "@types/react": "^17.0.0", + "@types/react-dom": "^17.0.0" + }, + "license": "MIT", + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + } +} \ No newline at end of file From 81e171c9d44f0252ef6ee4a2a5c8dcd59ebc68a1 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 19 Mar 2024 01:26:43 +0000 Subject: [PATCH 4/8] Add tsconfig.json for TypeScript compiler options --- tsconfig.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tsconfig.json diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..038dc67 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx" + }, + "include": ["src"] +} \ No newline at end of file From 67d1c3bfb438a09e9c36084a4037040c606e6f22 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 19 Mar 2024 01:26:50 +0000 Subject: [PATCH 5/8] Add public/index.html --- public/index.html | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 public/index.html diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..72e81ef --- /dev/null +++ b/public/index.html @@ -0,0 +1,11 @@ + + + + + + PR Pilot Demo React + + +
+ + \ No newline at end of file From 5177bbc2f98d60482aa9d9fd8b7d8520070252c6 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 19 Mar 2024 01:26:57 +0000 Subject: [PATCH 6/8] Add src/index.tsx as the entry point for the React application --- src/index.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/index.tsx diff --git a/src/index.tsx b/src/index.tsx new file mode 100644 index 0000000..d6909a3 --- /dev/null +++ b/src/index.tsx @@ -0,0 +1,11 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import './styles/App.css'; +import App from './components/App'; + +ReactDOM.render( + + + , + document.getElementById('root') +); \ No newline at end of file From a34979daa392addec3b60935d408891e822230f9 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 19 Mar 2024 01:27:02 +0000 Subject: [PATCH 7/8] Add src/components/App.tsx with a simple Hello PR Pilot message --- src/components/App.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/components/App.tsx diff --git a/src/components/App.tsx b/src/components/App.tsx new file mode 100644 index 0000000..1c96b32 --- /dev/null +++ b/src/components/App.tsx @@ -0,0 +1,14 @@ +import React from 'react'; +import '../styles/App.css'; + +function App() { + return ( +
+
+

Hello PR Pilot

+
+
+ ); +} + +export default App; \ No newline at end of file From 252ca71cb6be86876bd4876757b45069d00d2c8d Mon Sep 17 00:00:00 2001 From: root Date: Tue, 19 Mar 2024 01:30:31 +0000 Subject: [PATCH 8/8] Update package.json with the latest versions of dependencies --- package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 08ecdd7..b61afe2 100644 --- a/package.json +++ b/package.json @@ -10,14 +10,14 @@ "eject": "react-scripts eject" }, "dependencies": { - "react": "^17.0.2", - "react-dom": "^17.0.2", - "react-scripts": "4.0.3", - "typescript": "^4.1.2" + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-scripts": "5.0.1", + "typescript": "^5.4.2" }, "devDependencies": { - "@types/react": "^17.0.0", - "@types/react-dom": "^17.0.0" + "@types/react": "^18.2.67", + "@types/react-dom": "^18.2.67" }, "license": "MIT", "browserslist": {