I'm using node through Visual Studio task runner explorer to copy files from node_modules (xxx.min.js files) to the wwwroot of an ASP.NET core application. If the file is already checked in I get an error. I want to check out a Visual Studio project file if it already exists and if it is not already checked out. How can I do this with node?
In my package.json file I export a scripts command which I run through the task runner explorer.
{
"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"
}
}
You can use npm package 'tfs' and otherwise you can 'shelljs' to execute any command that you would execute in command prompt.