diff --git a/README.en.md b/README.en.md index ca32849..28ff4af 100644 --- a/README.en.md +++ b/README.en.md @@ -53,7 +53,7 @@ You can use the following environment variables to customize the configuration. ### Tencent CloudBase -Developed and deployed based on Tencent's open source project [CloudBase Framework](https://github.com/Tencent/cloudbase-framework) [![star](https://img.shields.io/github/stars/Tencent/cloudbase-framework?style=social)](https://github.com/Tencent/cloudbase-framework). One-click deploying is supported. +Developed and deployed based on Tencent's open source project [CloudBase Framework](https://github.com/Tencent/cloudbase-framework). One-click deploying is supported. [![腾讯云|Deploy to CloudBase](https://main.qcloudimg.com/raw/67f5a389f1ac6f3b4d04c7256438e44f.svg)](https://console.cloud.tencent.com/tcb/env/index?action=CreateAndDeployCloudBaseProject&appUrl=https%3A%2F%2Fgithub.com%2FYunYouJun%2Fair-conditioner%2F&branch=master) diff --git a/README.md b/README.md index ad911bd..39a3fb0 100644 --- a/README.md +++ b/README.md @@ -53,17 +53,19 @@ ### 腾讯云 -基于腾讯开源项目 [CloudBase Framework](https://github.com/Tencent/cloudbase-framework) [![star](https://img.shields.io/github/stars/Tencent/cloudbase-framework?style=social)](https://github.com/Tencent/cloudbase-framework) 开发部署,支持一键云端部署 +基于腾讯开源项目 [CloudBase Framework](https://github.com/Tencent/cloudbase-framework) 开发部署,支持一键云端部署。 [![腾讯云|部署到云开发](https://main.qcloudimg.com/raw/67f5a389f1ac6f3b4d04c7256438e44f.svg)](https://console.cloud.tencent.com/tcb/env/index?action=CreateAndDeployCloudBaseProject&appUrl=https%3A%2F%2Fgithub.com%2FYunYouJun%2Fair-conditioner%2F&branch=master) ## Dev ```bash +# 开发预览 # yarn dev yarn start # http://localhost:3000/ +# 构建项目 yarn build # ./build ``` diff --git a/package.json b/package.json index 3c47b41..2c1cf11 100644 --- a/package.json +++ b/package.json @@ -44,15 +44,15 @@ "dependencies": { "@emotion/react": "^11.4.0", "@emotion/styled": "^11.3.0", - "@material-ui/core": "^5.0.0-alpha.33", + "@material-ui/core": "^5.0.0-alpha.34", "@material-ui/icons": "^4.11.2", "@reduxjs/toolkit": "^1.5.1", "@testing-library/jest-dom": "^5.12.0", "@testing-library/react": "^11.2.7", "@testing-library/user-event": "^13.1.9", "@types/jest": "^26.0.23", - "@types/node": "^15.3.0", - "@types/react": "^17.0.5", + "@types/node": "^15.6.1", + "@types/react": "^17.0.8", "@types/react-dom": "^17.0.5", "@types/react-redux": "^7.1.16", "react": "^17.0.2", @@ -61,7 +61,7 @@ "react-redux": "^7.2.4", "react-router-dom": "^5.2.0", "react-scripts": "^4.0.3", - "sass": "^1.32.13", + "sass": "^1.34.0", "typescript": "^4.2.4", "web-vitals": "^1.1.2" }, diff --git a/src/App.tsx b/src/App.tsx index ac0817d..f3b04c4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -8,18 +8,32 @@ import Home from "./pages/Home"; import Rc from "./pages/Rc"; import { useEffect } from "react"; +import pkg from "../package.json"; + +/** + * 控制台输出信息 + * @param name 名称 + * @param link 链接 + * @param color 颜色 + * @param emoji + */ +function consoleInfo( + name: string, + link: string, + color = "#0078E7", + emoji = "☁️" +) { + console.log( + `%c ${emoji} ${name} %c ${link}`, + `color: white; background: ${color}; padding:5px 0;`, + `padding:4px;border:1px solid ${color};` + ); +} + function App() { useEffect(() => { - console.log( - `%c ☁️ air-conditioner %c https://github.com/YunYouJun/air-conditioner`, - "color: white; background: #0078E7; padding:5px 0;", - "padding:4px;border:1px solid #0078E7;" - ); - console.log( - `%c ☁️ @YunYouJun %c https://www.yunyoujun.cn`, - "color: white; background: #0078E7; padding:5px 0;", - "padding:4px;border:1px solid #0078E7;" - ); + consoleInfo(pkg.name, pkg.repository.url); + consoleInfo("@" + pkg.author.name, pkg.author.url); }, []); return (