All Projects → phodal → Javascript Refactor

phodal / Javascript Refactor

Licence: mit
前端工程师技能训练之重构

Programming Languages

javascript
184084 projects - #8 most used programming language

JavaScript Refactor

视频Demo: JavaScript 重构演示一

Build Status

这是一个用于生成Markdown的Micro Markdown库。

你要面对的挑战有:

  • 注释 (Comments) (ps: 合理的函数名、变量名可以取代注释)
  • 重复代码 (Duplicated Code)
  • 过大的类 (Large Class)
  • 多层嵌套
  • 。。。

可以参考的模式:

  • Decorator (装饰)
  • Composite (组成)

或者当时我想用的

  • Pipes and Filters

可以参考的书籍:

《重构与模式》

《重构: 改善既有代码的设计》

测试代码质量:

CodeClimate(ps: 用code climate来clean code与重构)

相关文章:

前端技能训练: 重构一

Setup

1.Install

npm install

2.Test

npm test

Enjoy it!

订阅

请到https://github.com/artisanstack/summary

点击右上角的watch即可订阅。

License

© 2015 Phodal Huang. This code is distributed under the MIT license. See LICENSE.txt in this directory.

待我代码编成,娶你为妻可好

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].