mirror of https://github.com/garrytan/gstack.git
Merge 732c1dd542 into a3259400a3
This commit is contained in:
commit
f5eee1b5a7
|
|
@ -13,6 +13,7 @@ import { discoverTemplates, discoverSkillFiles } from './discover-skills';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import { execSync } from 'child_process';
|
import { execSync } from 'child_process';
|
||||||
|
import { claude } from '../hosts/index';
|
||||||
|
|
||||||
const ROOT = path.resolve(import.meta.dir, '..');
|
const ROOT = path.resolve(import.meta.dir, '..');
|
||||||
const ROOT_REALPATH = fs.realpathSync(ROOT);
|
const ROOT_REALPATH = fs.realpathSync(ROOT);
|
||||||
|
|
@ -64,6 +65,7 @@ for (const file of SKILL_FILES) {
|
||||||
|
|
||||||
console.log('\n Templates:');
|
console.log('\n Templates:');
|
||||||
const TEMPLATES = discoverTemplates(ROOT);
|
const TEMPLATES = discoverTemplates(ROOT);
|
||||||
|
const claudeSkipSkills = new Set(claude.generation.skipSkills || []);
|
||||||
|
|
||||||
for (const { tmpl, output } of TEMPLATES) {
|
for (const { tmpl, output } of TEMPLATES) {
|
||||||
const tmplPath = path.join(ROOT, tmpl);
|
const tmplPath = path.join(ROOT, tmpl);
|
||||||
|
|
@ -72,6 +74,11 @@ for (const { tmpl, output } of TEMPLATES) {
|
||||||
console.log(` \u26a0\ufe0f ${output.padEnd(30)} — no template`);
|
console.log(` \u26a0\ufe0f ${output.padEnd(30)} — no template`);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
const dirName = path.dirname(tmpl);
|
||||||
|
if (dirName !== '.' && claudeSkipSkills.has(dirName)) {
|
||||||
|
console.log(` ✅ ${tmpl.padEnd(30)} → (skipped for primary host ${claude.displayName})`);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (!fs.existsSync(outPath)) {
|
if (!fs.existsSync(outPath)) {
|
||||||
hasErrors = true;
|
hasErrors = true;
|
||||||
console.log(` \u274c ${output.padEnd(30)} — generated file missing! Run: bun run gen:skill-docs`);
|
console.log(` \u274c ${output.padEnd(30)} — generated file missing! Run: bun run gen:skill-docs`);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue