Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
50 changes: 48 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
35 changes: 35 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"typescript": "^5.4.2"
},
"devDependencies": {
"@types/react": "^18.2.67",
"@types/react-dom": "^18.2.67"
},
"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"
]
}
}
11 changes: 11 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PR Pilot Demo React</title>
</head>
<body>
<div id="root"></div>
</body>
</html>
14 changes: 14 additions & 0 deletions src/components/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import '../styles/App.css';

function App() {
return (
<div className="App">
<header className="App-header">
<p>Hello PR Pilot</p>
</header>
</div>
);
}

export default App;
11 changes: 11 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './styles/App.css';
import App from './components/App';

ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
);
19 changes: 19 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"]
}