• 请不要在回答技术问题时复制粘贴 AI 生成的内容
banxi1988
V2EX  ›  程序员

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

  •  
  •   banxi1988 ·
    banxi1988 · May 13, 2018 · 2244 views
    This topic created in 2967 days ago, the information mentioned may be changed or developed.
    此次重构主要分为两个部分:
    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/
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2816 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 06:27 · PVG 14:27 · LAX 23:27 · JFK 02:27
    ♥ Do have faith in what you're doing.