Skip to content

Commit

Permalink
* Added wvc.tsc script. (helpful for external users of "web-vcore" pa…
Browse files Browse the repository at this point in the history
…ckage)
  • Loading branch information
Venryx committed Jun 17, 2024
1 parent 79ecd87 commit c43d2da
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
23 changes: 22 additions & 1 deletion Packages/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down Expand Up @@ -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"
},
]
}
3 changes: 2 additions & 1 deletion Packages/web-vcore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
8 changes: 8 additions & 0 deletions package-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)=>{
Expand Down

0 comments on commit c43d2da

Please sign in to comment.