1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-02-24 01:22:26 +01:00
BezierInfo-2/tools/build.js
2020-08-08 11:21:51 -07:00

19 lines
658 B
JavaScript

import LocaleStrings from "./locale-strings.js";
import getAllChapterFiles from "./build/get-all-chapter-files.js";
import processLocale from "./build/process-locale.js";
import createIndexPages from "./build/create-index-page.js";
/**
* main entry point:
* - aggregate all content files organized by locale
* -
*/
getAllChapterFiles().then((chapterFiles) => {
const languageCodes = Object.keys(chapterFiles);
languageCodes.forEach(async (locale) => {
const localeStrings = new LocaleStrings(locale);
const chapters = await processLocale(locale, localeStrings, chapterFiles);
createIndexPages(locale, localeStrings, chapters);
});
});