一个学习的项目
- yarn
- React 16
- Redux
- React Router 5
- antd
- eslint
- prettier
- axios
- mongoose
- lodash
- redux-saga
todo:
- eslint & pre
- mongoose
- saga
- bundle.js 拆分
yarn
# 开发环境
yarn dev
echo "# transport-man" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:Acmu/transport-man.git
git push -u origin master
or
git remote add origin git@github.com:Acmu/transport-man.git
git push -u origin master
添加 .prettierrc
.gitignore
文件
yarn init -y
git init
# 整理 package.json
yarn add --dev webpack webpack-dev-server webpack-cli html-webpack-plugin
# 写 src/index.html src/index.js webpack.config.js
touch webpack.config.js
# 用 babel
yarn add --dev @babel/core babel-loader @babel/preset-env @babel/preset-react
# 配置 .babelrc 和 webpack module
# add React
yarn add react react-dom
yarn add --dev cross-env webpack-merge husky eslint-plugin-prettier eslint-config-prettier
yarn add --dev react-hot-loader babel-eslint eslint eslint-plugin-react
yarn add axios lodash classnames recharts
yarn add --dev --exact prettier
yarn add --dev @babel/plugin-proposal-class-properties @babel/plugin-syntax-dynamic-import @babel/plugin-proposal-decorators
# 更换 antd
yarn add antd
yarn add --dev less less-loader style-loader css-loader babel-plugin-import
# 还可以加 immutable redux-actions
// eslint-disable-line prettier/prettier
<!-- prettier-ignore -->