https://github.com/cuixiaorui/refactoring
重构教程
https://github.com/cuixiaorui/refactoring
Last synced: 2 months ago
JSON representation
重构教程
- Host: GitHub
- URL: https://github.com/cuixiaorui/refactoring
- Owner: cuixiaorui
- License: mit
- Created: 2021-07-21T10:03:21.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-16T14:44:40.000Z (over 3 years ago)
- Last Synced: 2025-03-24T05:13:13.322Z (3 months ago)
- Language: TypeScript
- Size: 6.84 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# refactoring
重构教程
通过视频的方式来演示出重构的全过程
本教程可以理解为是视频化的《重构》版本
> 教程将采用代码+视频演示的方式
## 大纲
- 命名
- 变量
- 函数
- 类
- 重复的代码
- 长函数
- 大类
- 长参数列表
- 控制语句
- 封装
- 变量声明和赋值分离
- 依赖混乱
- 不一致的代码
- 落后的代码风格## 环境
- vscode
- nodejs
- typescript## 工具
强烈推荐使用[abracadabra](https://github.com/nicoespeon/abracadabra)
它是对 vscode 重构的一个加强插件
以及使用意图编程的利器[Hocus Pocus](https://marketplace.visualstudio.com/items?itemName=nicoespeon.hocus-pocus)
- 意图编程的思想[Wishful Thinking](https://wiki.c2.com/?WishfulThinking)