diff --git a/Packages/.vscode/tasks.json b/Packages/.vscode/tasks.json index 00ce7f9f..ec93423d 100644 --- a/Packages/.vscode/tasks.json +++ b/Packages/.vscode/tasks.json @@ -8,7 +8,7 @@ //"problemMatcher": "$tsc-watch", // The below are needed so that tsc's errors (as shown in Terminal and Problems panels) are resolved properly. (caused by our unusual usage, of opening vscode window #1 in "./Packages") - // It's needed here only because tsc requires working directly to be "./Packages/client". (because it doesn't allow specifying both "--build" and "--project") + // It's needed here only because tsc requires working directory to be "./Packages/client". (because it doesn't allow specifying both "--build" and "--project") "options": { "cwd": "${workspaceRoot}/client" }, @@ -80,5 +80,26 @@ "isBackground": true, "group": "build" }, + + // wvc + { + "label": "wvc.tsc (for external wvc users)", + "type": "shell", + "command": "npm start wvc.tsc", + + //"problemMatcher": "$tsc-watch", + // The below are needed so that tsc's errors (as shown in Terminal and Problems panels) are resolved properly. (caused by our unusual usage, of opening vscode window #1 in "./Packages") + // It's needed here only because tsc requires working directory to be "./Packages/client". (because it doesn't allow specifying both "--build" and "--project") + "options": { + "cwd": "${workspaceRoot}/web-vcore" + }, + "problemMatcher": { + "base": "$tsc-watch", + "fileLocation": ["relative", "${workspaceRoot}/web-vcore"] + }, + + "isBackground": true, + "group": "build" + }, ] } \ No newline at end of file diff --git a/Packages/web-vcore/package.json b/Packages/web-vcore/package.json index 9afd2c4f..2e617fe3 100644 --- a/Packages/web-vcore/package.json +++ b/Packages/web-vcore/package.json @@ -23,6 +23,7 @@ ".yalc" ], "scripts": { + "start": "cd ../.. && npx nps", "@comment_postinstall": "Behavior of the node-js subscript below: if '.git' doesn't exist under web-vcore, it's installed as a dep, so do nothing -- else, return error-code 1, causing patch-package to run.", "postinstall_old": "node -e \"let wvcAsDep = !require('fs').existsSync('.git'); if (!wvcAsDep) process.exit(1);\" || patch-package", "postinstall_old2": "node ./Scripts/@CJS/ApplyPatches.js", @@ -101,7 +102,7 @@ "html-webpack-plugin": "5.6.0", "immer": "^7.0.7", "ip": "^1.1.5", - "js-vextensions": "1.0.77", + "js-vextensions": "1.0.78", "lodash": "^4.17.15", "mini-css-extract-plugin": "^1.6.0", "mobx": "^6.3.2", diff --git a/package-scripts.js b/package-scripts.js index 81ce6da8..db8e0f3e 100644 --- a/package-scripts.js +++ b/package-scripts.js @@ -88,6 +88,14 @@ Object.assign(scripts, { }, }); +// these scripts are currently only needed when working on external (ie. non-debate-map) projects that user the web-vcore package +Object.assign(scripts, { + wvc: { + tsc: `cd Packages/web-vcore && ${pathToNPMBin("tsc", 2)} --build --watch`, + tsc_noWatch: `cd Packages/web-vcore && ${pathToNPMBin("tsc", 2)} --build`, + }, +}); + const appNamespace = "default"; //"app"; const KubeCTLCmd = context=>`kubectl${context ? ` --context ${context}` : ""}`; const GetPodInfos = (context = "", namespace = "", requiredLabels = [], filterOutNonRunning = true)=>{