2023-05-16 16:20:40 +02:00
|
|
|
const concurrently = require("concurrently");
|
|
|
|
const path = require("path");
|
|
|
|
const fs = require("fs");
|
|
|
|
|
|
|
|
function getFiles(dir) {
|
|
|
|
results = [];
|
|
|
|
fs.readdirSync(dir).forEach((file) => {
|
|
|
|
file = path.join(dir, file);
|
|
|
|
const stat = fs.statSync(file);
|
|
|
|
if (stat && stat.isDirectory()) {
|
|
|
|
results = results.concat(getFiles(file));
|
|
|
|
} else {
|
|
|
|
results.push(file);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return results;
|
|
|
|
}
|
|
|
|
|
|
|
|
const files = getFiles(path.join(__dirname, "..", "libs")).filter((file) => {
|
|
|
|
const name = path.basename(file);
|
|
|
|
return name === "tsconfig.spec.json";
|
|
|
|
});
|
|
|
|
|
2024-12-09 20:58:50 +01:00
|
|
|
concurrently([
|
|
|
|
{
|
|
|
|
// run the strict type check plugin until we're fully converted, then update tsconfig.json to use strict
|
|
|
|
name: "typescript-strict-plugin",
|
|
|
|
command: "npx tsc-strict",
|
|
|
|
},
|
|
|
|
...files.map((file) => ({
|
2023-05-16 16:20:40 +02:00
|
|
|
name: path.basename(path.dirname(file)),
|
|
|
|
command: `npx tsc --noEmit --project ${file}`,
|
|
|
|
})),
|
2024-12-09 20:58:50 +01:00
|
|
|
]);
|