mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
17 lines
480 B
TypeScript
17 lines
480 B
TypeScript
|
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`);
|
||
|
out.length > 0 && console.log(out.toString());
|
||
|
} catch (e) {
|
||
|
console.error(e);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
for (const { packageName } of Object.values(packageOptions)) {
|
||
|
buildType(packageName);
|
||
|
}
|