INNER CODE UNIT · TypeScript
main
cyanheads/pubmed-mcp-server · scripts/build.ts:118
async function main() {
// Read package info
const pkg = JSON.parse(readFileSync(join(ROOT_DIR, 'package.json'), 'utf-8'));
const project = resolveProject(process.argv);
console.log(`\x1b[1mBuilding ${pkg.name}@${pkg.version}\x1b[0m`);
console.log(`\x1b[2m tsconfig: ${project}\x1b[0m`);
const totalStart = performance.now();
// Step 1: tsc
const tsc = await exec([join(ROOT_DIR, 'node_modules', '.bin', 'tsc'), '-p', project], 'tsc');
if (!tsc.ok) process.exit(1);
// Step 2: tsc-alias
const alias = await exec(
[join(ROOT_DIR, 'node_modules', '.bin', 'tsc-alias'), '-p', project],
'tsc-alias',