From 7e9f446079103e6e0a91803e4d421dc6d7cb047c Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Thu, 17 Nov 2022 17:56:46 +0700 Subject: [PATCH] =?UTF-8?q?=D0=92=20=D1=80=D0=B5=D0=BB=D0=B8=D0=B7=20?= =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=20readme.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/prepkg.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build/prepkg.js b/build/prepkg.js index 5e4ba08..60f9171 100644 --- a/build/prepkg.js +++ b/build/prepkg.js @@ -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)) {