1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-25 12:15:18 +01:00
bitwarden-browser/scripts/test-types.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
716 B
JavaScript
Raw Normal View History

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";
});
concurrently(
files.map((file) => ({
name: path.basename(path.dirname(file)),
command: `npx tsc --noEmit --project ${file}`,
}))
);