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)) {