前端工程师技能训练之重构Sea.js

1,519 阅读1分钟

Build Status Coverage Status Code Climate

说明: 这段代码是Seajs中用来解析依赖的代码util-deps.js。 代码文件: index.js

视频教程Demo1: 前端工程师技能训练之重构Sea.js

你要面对的挑战有:

  1. 重复代码 (Duplicated Code)
  2. 过大的类 (Large Class)
  3. 面向过程的方法
  4. 74个warning 4 typos;
  5. 小部门功能测试不全

详细见CodeClimate报告: index.js

可以参考的书籍:

《重构与模式》

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

Setup

1.Install

npm install

2.Test

npm test

Enjoy it!

订阅

请到github.com/artisanstac…

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

License

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

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