В релиз добавлен readme.html

This commit is contained in:
Book Pauk
2022-11-17 17:56:46 +07:00
parent 13c3c98c63
commit 7e9f446079

View File

@@ -2,6 +2,8 @@ const fs = require('fs-extra');
const path = require('path');
const { execSync } = require('child_process');
const showdown = require('showdown');
const platform = process.argv[2];
const distDir = path.resolve(__dirname, '../dist');
@@ -15,6 +17,12 @@ async function build() {
await fs.emptyDir(outDir);
//добавляем readme в релиз
let readme = await fs.readFile(path.resolve(__dirname, '../README.md'), 'utf-8');
const converter = new showdown.Converter();
readme = converter.makeHtml(readme);
await fs.writeFile(`${outDir}/readme.html`, readme);
// перемещаем public на место
if (await fs.pathExists(publicDir)) {