【问题标题】:Is there a way to run "tsc -watch" and "npm start" at the same time, with a click of a button/ shortcut on VSCode?有没有办法通过单击 VSCode 上的按钮/快捷方式同时运行“tsc -watch”和“npm start”?
【发布时间】:2020-09-16 22:04:44
【问题描述】:

我是 node.js 和 typescript 的新手,我想知道是否有任何方法可以通过单击 Visual Studio 代码上的按钮或命令来同时运行这两个命令。

谢谢

【问题讨论】:

    标签: javascript node.js typescript visual-studio-code npm-start


    【解决方案1】:

    您可以通过单击左侧显示的“npm 脚本”选项卡来执行命令(默认)

    如果你想通过单击执行多个命令,你必须使用类似concurrently

    打开你的 package.json 并编辑脚本

    "script" : {
      "my-script": "concurrently \"tsc-watch\" \"npm start\""
    }
    

    【讨论】:

      猜你喜欢
      • 2016-11-11
      • 1970-01-01
      • 2020-11-30
      • 1970-01-01
      • 1970-01-01
      • 2021-01-28
      • 1970-01-01
      • 2022-10-22
      • 2019-07-01
      相关资源
      最近更新 更多