This commit is contained in:
2026-01-29 16:00:19 +03:00
parent 2b108e8f96
commit 7e2dea74ef
56 changed files with 539 additions and 1149 deletions

23
concat-md.js Normal file
View File

@@ -0,0 +1,23 @@
import concatMd, { concatMdSync } from "concat-md";
import path from "path";
import fs from "fs";
const resultMd = concatMdSync("./parts", {
toc: false,
sorter: (a, b) => {
// Извлекаем номер из начала имени файла (например, "1" из "1-assistent.md")
const getNumber = (filename) => {
const match = filename.match(/^(\d+)/);
return match ? parseInt(match[1], 10) : 0;
};
// Сортировка по возрастанию (1, 2, 3...)
return getNumber(a) - getNumber(b);
}
});
// Записываем результат в файл .cursorrules в корне проекта
const outputPath = path.join("./", ".cursorrules");
fs.writeFileSync(outputPath, resultMd, "utf8");
console.log(`Файл .cursorrules успешно создан: ${outputPath}`);