chore: вынести генерацию в CI
- generated/ и README_RU.md добавлены в .gitignore - README.md заменён на статичный с ссылками на документацию - генерация README убрана из concat-md.js - npm run docs добавлен в Dockerfile перед билдом
This commit is contained in:
15
concat-md.js
15
concat-md.js
@@ -73,19 +73,4 @@ const buildRules = (lang) => {
|
||||
buildRules("ru");
|
||||
buildRules("en");
|
||||
|
||||
// Генерируем README из index.md
|
||||
const buildReadme = (lang, outFile) => {
|
||||
const indexPath = `./docs/${lang}/index.md`;
|
||||
|
||||
if (!fs.existsSync(indexPath)) {
|
||||
console.log(`Пропуск README (${lang}): ${indexPath} не найден`);
|
||||
return;
|
||||
}
|
||||
|
||||
const content = stripFrontmatter(fs.readFileSync(indexPath, "utf8"));
|
||||
fs.writeFileSync(outFile, content, "utf8");
|
||||
console.log(`${outFile} создан из ${indexPath}`);
|
||||
};
|
||||
|
||||
buildReadme("en", "./README.md");
|
||||
buildReadme("ru", "./README_RU.md");
|
||||
|
||||
Reference in New Issue
Block a user