Restructure files

This commit is contained in:
aet
2021-11-11 23:56:06 -05:00
parent b4b21561ed
commit bdd46a530c
29 changed files with 271 additions and 179 deletions

View File

@ -12,8 +12,13 @@ fs.writeFileSync(
dtsPath,
`type Translation = Record<string, string>;
declare const exportee: {
${Object.keys(json)
.map(x => `${x}: Translation;`)
${Object.entries(json)
.map(
([category, value]) =>
`${category}: {\n${Object.keys(value)
.map(key => ` ${key}: Translation;`)
.join("\n")}\n };`
)
.join("\n ")}
};
export default exportee;