Skip to content

Commit

Permalink
chore: modify template README file
Browse files Browse the repository at this point in the history
  • Loading branch information
Simoon-F committed Feb 15, 2024
1 parent 7fc2473 commit ccf7182
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 45 deletions.
45 changes: 21 additions & 24 deletions templates/template-react-recoil/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# React Vite Recoil Boilerplate
# React TS Boilerplate

## 技术栈
## Technology Stack

- [Vite](https://vitejs.dev)
- [React](https://reactjs.org)
- [TypeScript](https://www.typescriptlang.org)
- [ReactRouter](https://reactrouter.com/docs/en/v6)
- [Vite](https://vitejs.dev): Efficient build tool for modern browsers.
- [React](https://reactjs.org): JavaScript library for building user interfaces.
- [TypeScript](https://www.typescriptlang.org): Superset of JavaScript with static type-checking.
- [ReactRouter](https://reactrouter.com/docs/en/v6): Navigation library for React applications.
- [TailwindCss](https://tailwindcss.com/): Utility-first CSS framework for creating custom designs.
- [Axios](https://axios-http.com/): Promise-based HTTP client for the browser and Node.js.
- [Ramda](https://ramdajs.com/): Functional programming library for JavaScript.
- [ahooks](https://ahooks.js.org/): Collection of React Hooks for common tasks.
- [Recoil](https://recoiljs.org/): A state management library for React.

## 快速开始
## Quick Start

Install project dependencies

Expand All @@ -21,39 +26,31 @@ Launch the app, it will become available at [http://localhost:3000](http://local
yarn dev
```

## 项目规范
## Project Standards

- xxx
- xxx
- xxx

## 目录结构
## Directory Structure

`├──`[`.vscode`](.vscode) — VSCode settings including code snippets, recommended extensions etc<br>
`├──`[`public`](./public) — Static assets such as robots.txt, index.html etc<br>
`├──`[`src/assets`](./src/assets) — Static assets<br>
`├──`[`src/components`](./src/components) — React public components<br>
`├──`[`src/hooks`](./src/hooks) — React public hooks<br>
`├──`[`src/models`](./src/models) — Status management file<br>
`├──`[`src/models`](./src/hooks) — Status Management<br>
`├──`[`src/pages`](./src/pages) — Application and page (screen) components<br>
`├──`[`src/routes`](./src/routes) — Application routes components<br>
`├──`[`src/theme`](./src/services) — External connection service<br>
`├──`[`src/utils`](./src/utils) — Utility functions<br>

## 安装以下 vscode 插件方便开发
## Recommended VSCode Extensions

Tailwind CSS IntelliSense
- [Tailwind CSS IntelliSense](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss): IntelliSense for Tailwind CSS.
- [Prettier - Code formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode&ssr=false#overview): Code formatting tool.
- [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig): Editor configuration consistency.

> https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss
## Coding Conventions

Prettier - Code formatter

> https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode&ssr=false#overview
EditorConfig for VS Code

> https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig
## 编码约定

> https://github.com/sj-distributor/react-coding-conventions
- Check [here](https://github.com/sj-distributor/react-coding-conventions).
67 changes: 46 additions & 21 deletions templates/template-react-zustand/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,55 @@
# React + TypeScript + Vite
# React TS Boilerplate

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
## Technology Stack

Currently, two official plugins are available:
- [Vite](https://vitejs.dev): Efficient build tool for modern browsers.
- [React](https://reactjs.org): JavaScript library for building user interfaces.
- [TypeScript](https://www.typescriptlang.org): Superset of JavaScript with static type-checking.
- [ReactRouter](https://reactrouter.com/docs/en/v6): Navigation library for React applications.
- [Axios](https://axios-http.com/): Promise-based HTTP client for the browser and Node.js.
- [Ramda](https://ramdajs.com/): Functional programming library for JavaScript.
- [ahooks](https://ahooks.js.org/): Collection of React Hooks for common tasks.
- [Zustand](https://zustand-demo.pmnd.rs/): Small, fast and scaleable bearbones state-management solution.

- [@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
## Quick Start

## Expanding the ESLint configuration
Install project dependencies

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
```
pnpm install
```

- Configure the top-level `parserOptions` property like this:
Launch the app, it will become available at [http://localhost:3000](http://localhost:3000/)

```js
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
```
pnpm dev
```

## Project Standards

- xxx
- xxx
- xxx

## Directory Structure

`├──`[`.vscode`](.vscode) — VSCode settings including code snippets, recommended extensions etc<br>
`├──`[`public`](./public) — Static assets such as robots.txt, index.html etc<br>
`├──`[`src/assets`](./src/assets) — Static assets<br>
`├──`[`src/components`](./src/components) — React public components<br>
`├──`[`src/hooks`](./src/hooks) — React public hooks<br>
`├──`[`src/models`](./src/hooks) — Status Management<br>
`├──`[`src/pages`](./src/pages) — Application and page (screen) components<br>
`├──`[`src/routes`](./src/routes) — Application routes components<br>
`├──`[`src/theme`](./src/services) — External connection service<br>
`├──`[`src/utils`](./src/utils) — Utility functions<br>

## Recommended VSCode Extensions

- [Tailwind CSS IntelliSense](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss): IntelliSense for Tailwind CSS.
- [Prettier - Code formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode&ssr=false#overview): Code formatting tool.
- [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig): Editor configuration consistency.

## Coding Conventions

- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
- Check [here](https://github.com/sj-distributor/react-coding-conventions).

0 comments on commit ccf7182

Please sign in to comment.