项目地址: https://github.com/Sakuyakun/Yorha-Boilerplate
Yorha-Boilerplate 可能是最简单友好的 React 单页面开发环境
如果有错误或者好的建议请联系我,正在使用该环境开发组件库。
├── dist # 打包输出目录 ├── src │ ├── component # 组件目录 │ ├── actions # Redux Actions 文件目录 │ ├── reducers # Redux reducers 文件目录 │ ├── assets # 资源目录 │ ├── themes # 主题样式目录 │ ├── template # 模板目录 │ ├── utils # Utility and helper classes │ ├── views # 路由主页面 │ ├── entry.jsx # 入口文件 │ ├── routers.jsx # React Router 路由文件 │ ├── normalize.scss # normalize │ ├── style.scss # 公共样式 │ └── withStyles.js # withStyles ├── index.html # devServer 主页 ├── package-lock.json # package 锁文件 ├── package.json # package ├── postcss.config.js # postCSS 配置文件 ├── webpack.config.js # Webpack 基本配置 ├── webpack.dev.config.js # Webpack 开发环境配置 └── webpack.prod.config.js # Webpack 部署环境配置
npm run start
开发环境启动
npm run build
部署打包
npm run lint
代码检测
![]() | 1 KeepPro 2017-08-16 02:27:35 +08:00 via Android 感谢分享,最近再看 react 呢。 |
![]() | 2 zoues 2017-08-16 08:08:25 +08:00 via iPhone creat-react-app |
![]() | 3 BearD01001 2017-08-16 09:32:00 +08:00 creat-react-app +1 |
![]() | 4 tinytin 2017-08-16 10:38:54 +08:00 我搭了一个更基础的 typescript + react 环境 ├── dist ├── node_modules ├──package.json ├── src ├── index.tsx ├── tsconfig.json ├── webpack.config.js └── yarn.lock yarn run dev yarn run build https://github.com/GaryChangCN/react-webpack-typescript-cli |
5 sohucw 2017-08-16 12:48:46 +08:00 现在 redux 基本被 mobx 取代了 建议 react + mobx 项目 ( redux 原理要懂) |
![]() | 6 Sakuyakun OP @zoues @BearD01001 creat react app 确实十分方便直接但重新搭环境的话也是能了解到挺多东西的 我也是刚学 webpack 不久后搭出来 :D |
![]() | 7 Sakuyakun OP @sohucw mobx 目前还没去看 现在包括公司的项目中还是用的 redux 加 immutable 后也在实践中 |
![]() | 9 lixiangzaizheli 2017-08-16 13:56:59 +08:00 404 |
![]() | 10 Sakuyakun OP @lixiangzaizheli 地址错误已经改过来了 |