Unverified Commit fad2bbc1 authored by linfeng's avatar linfeng Committed by GitHub

Merge pull request #3 from LollipopsAndWine/feat/ade/dev

feat: add readme
parents 5965b788 c2dd0801
...@@ -37,3 +37,5 @@ ocr_demo ...@@ -37,3 +37,5 @@ ocr_demo
source.dev.env source.dev.env
tmp tmp
projects/web/node_modules
\ No newline at end of file
# React + TypeScript + Vite ### 前端本地开发
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. 1. 安装 nodejs 18 和 pnpm;
```javascript
Currently, two official plugins are available: npm install -g pnpm
- [@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
## Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level `parserOptions` property like this:
```js
export default tseslint.config({
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})
``` ```
2. 执行 `pnpm install && pnpm run dev` 即可。⚠️ 注意:此命令仅用于本地开发,不要用于部署!
- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked` 3. build
- Optionally add `...tseslint.configs.stylisticTypeChecked` ```
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config: 1.pnpm run build
2.npm run buil
```js
// eslint.config.js
import react from 'eslint-plugin-react'
export default tseslint.config({
// Set the react version
settings: { react: { version: '18.3' } },
plugins: {
// Add the react plugin
react,
},
rules: {
// other rules...
// Enable its recommended rules
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
},
})
``` ```
\ No newline at end of file
...@@ -5,13 +5,14 @@ ...@@ -5,13 +5,14 @@
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite --host ", "dev": "vite --host ",
"build": "tsc -b && vite build", "build": "tsc --noEmit && vite build",
"lint": "eslint .", "lint": "eslint .",
"preview": "vite preview" "preview": "vite preview"
}, },
"dependencies": { "dependencies": {
"@ant-design/icons": "^5.4.0", "@ant-design/icons": "^5.4.0",
"@codemirror/view": "^6.33.0", "@codemirror/view": "^6.33.0",
"@tanstack/react-query": "^5.56.2",
"@types/lodash": "^4.17.7", "@types/lodash": "^4.17.7",
"@types/qs": "^6.9.15", "@types/qs": "^6.9.15",
"@types/react-copy-to-clipboard": "^5.0.7", "@types/react-copy-to-clipboard": "^5.0.7",
...@@ -30,6 +31,7 @@ ...@@ -30,6 +31,7 @@
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"react-intl": "^6.6.8", "react-intl": "^6.6.8",
"react-markdown": "^9.0.1", "react-markdown": "^9.0.1",
"react-query": "^3.39.3",
"react-router-dom": "^6.26.1", "react-router-dom": "^6.26.1",
"react-syntax-highlighter": "^15.5.0", "react-syntax-highlighter": "^15.5.0",
"rehype-katex": "^7.0.1", "rehype-katex": "^7.0.1",
......
This diff is collapsed.
...@@ -70,8 +70,6 @@ const processResponse = <T>( ...@@ -70,8 +70,6 @@ const processResponse = <T>(
instance.interceptors.request.use( instance.interceptors.request.use(
(config) => { (config) => {
// TODO: 开源的的时候要去掉
config.headers.Authorization = `Bearer ${Cookies.get("uaa-token")}`;
return config; return config;
}, },
(error) => { (error) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment