2026-07-24 14:35:35 +03:00
|
|
|
import fs from 'node:fs';
|
|
|
|
|
import path from 'node:path';
|
|
|
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
|
import skillConfig from '../src-skills/slm-design/skill.config.mjs';
|
2026-08-01 09:31:08 +03:00
|
|
|
import {
|
|
|
|
|
createSkillBundle,
|
|
|
|
|
resolveSkillPaths,
|
|
|
|
|
validateSkillBundle,
|
|
|
|
|
writeSkillBundle,
|
|
|
|
|
} from './lib/skill-bundle.mjs';
|
2026-07-24 14:35:35 +03:00
|
|
|
|
|
|
|
|
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
2026-08-01 09:31:08 +03:00
|
|
|
const { outputDir, outputRoot } = resolveSkillPaths({ config: skillConfig, repoRoot });
|
|
|
|
|
const bundle = createSkillBundle({ config: skillConfig, repoRoot });
|
2026-07-24 14:35:35 +03:00
|
|
|
|
2026-08-01 09:31:08 +03:00
|
|
|
validateSkillBundle({ bundle, config: skillConfig, repoRoot });
|
|
|
|
|
fs.mkdirSync(outputRoot, { recursive: true });
|
|
|
|
|
writeSkillBundle({ bundle, outputDir });
|
2026-07-24 14:35:35 +03:00
|
|
|
|
2026-08-01 09:31:08 +03:00
|
|
|
console.log(`Built ${path.relative(repoRoot, outputDir)} (${bundle.size} files)`);
|