Readme updated
This commit is contained in:
128
README.md
128
README.md
@ -1,54 +1,96 @@
|
||||
# React + TypeScript + Vite
|
||||
# Deployer Project
|
||||
|
||||
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
||||
Deployer is a React + TypeScript + Vite project designed to provide a robust and scalable foundation for building modern web applications. This project includes Tailwind CSS for styling, ESLint for linting, and a modular structure for easy development and maintenance.
|
||||
|
||||
Currently, two official plugins are available:
|
||||
## Features
|
||||
|
||||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
|
||||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
||||
- **React**: A JavaScript library for building user interfaces.
|
||||
- **TypeScript**: Strongly typed programming language that builds on JavaScript.
|
||||
- **Vite**: A fast build tool and development server.
|
||||
- **Tailwind CSS**: A utility-first CSS framework for rapid UI development.
|
||||
- **ESLint**: A tool for identifying and fixing problems in JavaScript/TypeScript code.
|
||||
|
||||
## Expanding the ESLint configuration
|
||||
## Project Structure
|
||||
|
||||
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
||||
The project is organized as follows:
|
||||
|
||||
```js
|
||||
export default tseslint.config({
|
||||
extends: [
|
||||
// Remove ...tseslint.configs.recommended and replace with this
|
||||
...tseslint.configs.recommendedTypeChecked,
|
||||
// Alternatively, use this for stricter rules
|
||||
...tseslint.configs.strictTypeChecked,
|
||||
// Optionally, add this for stylistic rules
|
||||
...tseslint.configs.stylisticTypeChecked,
|
||||
],
|
||||
languageOptions: {
|
||||
// other options...
|
||||
parserOptions: {
|
||||
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
})
|
||||
```
|
||||
public/
|
||||
- Static assets like images and icons.
|
||||
src/
|
||||
- Main application code.
|
||||
- assets/: Contains images and other static resources.
|
||||
- components/: Reusable React components.
|
||||
- context/: Context API for state management.
|
||||
- hooks/: Custom React hooks.
|
||||
- layout/: Layout components like headers and sidebars.
|
||||
- pages/: Page-level components.
|
||||
- icons/: SVG icons used in the application.
|
||||
```
|
||||
|
||||
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
||||
## Getting Started
|
||||
|
||||
```js
|
||||
// eslint.config.js
|
||||
import reactX from 'eslint-plugin-react-x'
|
||||
import reactDom from 'eslint-plugin-react-dom'
|
||||
### Prerequisites
|
||||
|
||||
export default tseslint.config({
|
||||
plugins: {
|
||||
// Add the react-x and react-dom plugins
|
||||
'react-x': reactX,
|
||||
'react-dom': reactDom,
|
||||
},
|
||||
rules: {
|
||||
// other rules...
|
||||
// Enable its recommended typescript rules
|
||||
...reactX.configs['recommended-typescript'].rules,
|
||||
...reactDom.configs.recommended.rules,
|
||||
},
|
||||
})
|
||||
- Node.js (>= 14.x)
|
||||
- npm or yarn
|
||||
|
||||
### Installation
|
||||
|
||||
1. Clone the repository:
|
||||
```bash
|
||||
git clone <repository-url>
|
||||
```
|
||||
|
||||
2. Navigate to the project directory:
|
||||
```bash
|
||||
cd deployer
|
||||
```
|
||||
|
||||
3. Install dependencies:
|
||||
```bash
|
||||
npm install
|
||||
# or
|
||||
yarn install
|
||||
```
|
||||
|
||||
### Development
|
||||
|
||||
Start the development server:
|
||||
```bash
|
||||
npm run dev
|
||||
# or
|
||||
yarn dev
|
||||
```
|
||||
|
||||
### Build
|
||||
|
||||
Build the project for production:
|
||||
```bash
|
||||
npm run build
|
||||
# or
|
||||
yarn build
|
||||
```
|
||||
|
||||
### Lint
|
||||
|
||||
Run ESLint to check for code issues:
|
||||
```bash
|
||||
npm run lint
|
||||
# or
|
||||
yarn lint
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
### Tailwind CSS
|
||||
|
||||
Tailwind CSS is configured in `tailwind.config.js`. You can customize the theme, plugins, and other settings as needed.
|
||||
|
||||
### ESLint
|
||||
|
||||
ESLint is configured in `eslint.config.js`. You can expand the configuration to include additional rules and plugins as described in the [README](./README.md).
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the MIT License. See the LICENSE file for details.
|
||||
|
||||
Reference in New Issue
Block a user