Implement big text view and preliminary i18n

This commit is contained in:
aet
2021-11-06 21:49:54 -04:00
parent d2ae4be194
commit 7ee6990be1
22 changed files with 624 additions and 263 deletions

View File

@ -0,0 +1,21 @@
#!/usr/bin/env node
const fs = require("fs")
const { resolve } = require("path")
const { load } = require("js-yaml")
const ymlPath = resolve(__dirname, "../src/i18n/texts.yml")
const json = load(fs.readFileSync(ymlPath, "utf-8"))
const dtsPath = ymlPath + ".d.ts"
fs.writeFileSync(
dtsPath,
`type Translation = Record<string, string>;
declare const exportee: {
${Object.keys(json)
.map(x => `${x}: Translation;`)
.join("\n ")}
};
export default exportee;
`
)

View File

@ -1,5 +1,5 @@
#!/bin/sh
yarn build
npx vite build
NODE_ENV=production ./esbuild.js
./scripts/build-package-json.js
./node_modules/.bin/electron-builder build