# react-demo **Repository Path**: wanglingyun/react-demo ## Basic Information - **Project Name**: react-demo - **Description**: react+antd的学习demo - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-10-19 - **Last Updated**: 2021-10-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # react 测试demo ## 快速启动 ### 环境依赖 1、依赖node 前往https://nodejs.org/zh-cn/ 下载node并安装 2、依赖yarn 前往https://yarn.bootcss.com/ 或者 https://yarnpkg.com/latest.msi 下载并安装yarn 也可以使用如下命令进行安装 ``` -- NPM设置成淘宝镜像 npm config set registry http://registry.npm.taobao.org/ -g -- 快捷安装yarn window下使用命令安装容易出错,建议使用网页下载。 npm install -g yarn -- macOs安装yarn curl -o- -L https://yarnpkg.com/install.sh | bash -- liunx安装yarn sudo apt-get update && sudo apt-get install yarn -- 检查yarn安装是否成功 yarn --version -- yarn设置成淘宝镜像 yarn config set registry http://registry.npm.taobao.org/ -g ``` ### `yarn start` 启动项目 This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). ``` -- 启动项目 这种启动是开发模式。可以进行debug,修改保存实时刷新页面。 yarn start ``` Runs the app in the development mode.\ Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 若出现 'react-scripts' 不是内部或外部命令,也不是可运行的程序 ``` -- 安装依赖包 yarn add packagename -- 或者安装全部包 yarn install ``` ### `yarn build` 项目打包 部署前使用 yarn build 进行打包 将打好的包是静态html文件。放入cdn或者nginx或者tomcat或者node环境中直接启动即可运行。