【问题标题】:checking out Visual Studio 2017 files through node scripts通过节点脚本签出 Visual Studio 2017 文件
【发布时间】:2017-09-21 07:15:54
【问题描述】:

我通过 Visual Studio 任务运行器资源管理器使用节点将文件从 node_modules(xxx.min.js 文件)复制到 ASP.NET 核心应用程序的 wwwroot。如果文件已经签入,我会收到错误消息。我想检查一个 Visual Studio 项目文件是否已经存在并且尚未签出。我怎样才能用节点做到这一点?

在我的 package.json 文件中,我导出了一个脚本命令,我通过任务运行器资源管理器运行该命令。

{
  "version": "6.0.0",
  "name": "domain.basisarchitectuur.web",
  "private": true,
  "dependencies": {
  "jquery": "^1",
   "jquery-ui-1-11-1": "^1.11.1",
   "underscore": "^1.6.0",
   "bootstrap": "^3.3.4"
 },
 "scripts": {
   "expose-vendor-scripts": "node .\\node\\copy-vendor-scripts-to-wwwroot.js"
 }
}

【问题讨论】:

    标签: node.js npm visual-studio-2017 task-runner-explorer


    【解决方案1】:

    您可以使用 npm package 'tfs',否则您可以使用 'shelljs' 来执行您将在命令提示符下执行的任何命令。

    【讨论】:

      猜你喜欢
      • 2017-10-06
      • 1970-01-01
      • 1970-01-01
      • 2019-03-31
      • 1970-01-01
      • 2017-09-07
      • 1970-01-01
      • 1970-01-01
      • 2017-07-31
      相关资源
      最近更新 更多