2024-06-29 16:09:50 +05:30
|
|
|
/* eslint-disable no-console */
|
2023-11-23 22:31:11 +05:30
|
|
|
import { packageOptions } from './common.js';
|
|
|
|
import { execSync } from 'child_process';
|
|
|
|
|
|
|
|
const buildType = (packageName: string) => {
|
|
|
|
console.log(`Building types for ${packageName}`);
|
|
|
|
try {
|
|
|
|
const out = execSync(`tsc -p ./packages/${packageName}/tsconfig.json --emitDeclarationOnly`);
|
2024-06-29 16:09:50 +05:30
|
|
|
if (out.length > 0) {
|
|
|
|
console.log(out.toString());
|
|
|
|
}
|
2023-11-23 22:31:11 +05:30
|
|
|
} catch (e) {
|
|
|
|
console.error(e);
|
2024-06-29 16:09:50 +05:30
|
|
|
if (e.stdout.length > 0) {
|
|
|
|
console.error(e.stdout.toString());
|
|
|
|
}
|
|
|
|
if (e.stderr.length > 0) {
|
|
|
|
console.error(e.stderr.toString());
|
|
|
|
}
|
2023-11-23 22:31:11 +05:30
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
for (const { packageName } of Object.values(packageOptions)) {
|
|
|
|
buildType(packageName);
|
|
|
|
}
|