An open API service indexing awesome lists of open source software.

https://github.com/cuixiaorui/refactoring

重构教程
https://github.com/cuixiaorui/refactoring

Last synced: 2 months ago
JSON representation

重构教程

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)