mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 12:45:39 +01:00
32 lines
740 B
TypeScript
32 lines
740 B
TypeScript
import { spawnSync } from "child_process";
|
|
import { globSync } from "glob";
|
|
import { exit } from "process";
|
|
|
|
let someFileError = false;
|
|
const files = globSync("src/website/data/playground-samples/*/*/*.js");
|
|
for (const file of files) {
|
|
const command = `yarn tsc --noEmit --allowJs --checkJs --skipLibCheck ../out/monaco-editor/monaco.d.ts ${file}`;
|
|
console.log(file);
|
|
const { status, stdout } = spawnSync(
|
|
"yarn",
|
|
[
|
|
"tsc",
|
|
"--noEmit",
|
|
"--allowJs",
|
|
"--checkJs",
|
|
"--skipLibCheck",
|
|
"../out/monaco-editor/monaco.d.ts",
|
|
file,
|
|
],
|
|
{ shell: true }
|
|
);
|
|
if (status != 0) {
|
|
console.log(stdout.toString());
|
|
someFileError = true;
|
|
}
|
|
}
|
|
|
|
if (someFileError) {
|
|
console.error("Some files had type errors.");
|
|
exit(1);
|
|
}
|