V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
banxi1988
V2EX  ›  程序员

使用 async/await 重构 VSCode 插件 vscode-file-templates-ext

  •  
  •   banxi1988 ·
    banxi1988 · 2018-05-13 17:57:34 +08:00 · 1711 次点击
    这是一个创建于 2172 天前的主题,其中的信息可能已经有所发展或是发生改变。
    此次重构主要分为两个部分:
    1 )项目配置更新。
    2 ) 插件逻辑代码重构

    其中代码重构主要在于:
    1 )使用 async/await 减少原来代码的嵌套逻辑。
    2 )封装成类,拆分过长的函数。

    重构前代码见:
    https://github.com/banxi1988/vscode-file-templates-ext/tree/1.2.0

    重构后代码见:
    https://github.com/banxi1988/vscode-file-templates-ext/
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3443 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 21ms · UTC 11:38 · PVG 19:38 · LAX 04:38 · JFK 07:38
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.