| 命名规范
| 1,文件夹/文件名统一小写
| 2,jsx/js 文件名统一 帕斯卡命名 AaSs
| 3,组件名称 帕斯卡命名 SsAa
| 4,函数/变量命名 驼峰 aaSs
| 5,样式类命名 小写加- header-left
| 顶部文档注释(推荐使用)
/*
* @description: 中文说明
* @author: name
* @update: time(xxxx-xx-xx xx:xx)
*/
安装依赖
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" # Install Homebrew
brew install yarn # Install Latest Nodejs & Yarn
调试
# watch service
npm run dev
# production run
npm run build
框架与组件 | 说明 |
---|---|
react | A declarative, efficient, and flexible JavaScript library for building user interfaces. |
prop-types | Runtime type checking for React props and similar objects. |
UI 组件 | |
react-slick | 轮播插件 |
样式 |
| 测试相关 | | | Jest | http://facebook.github.io/jest/ |
类别 | |
---|---|
clean-code-js | JavaScript 风格指南 |
airbnb | Airbnb 代码规范 |