1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-05 22:57:29 +02:00

Revert "Revert "Update website""

This reverts commit 49b56e84a7.
This commit is contained in:
Laurent Cozic
2019-02-27 23:38:50 +00:00
parent 49b56e84a7
commit 770a435029
17 changed files with 499 additions and 42 deletions

View File

@@ -0,0 +1,21 @@
const fs = require('fs-extra');
const cwd = process.cwd();
const outputDir = cwd + '/lib/rnInjectedJs';
async function copyJs(name, filePath) {
const js = await fs.readFile(filePath, 'utf-8');
const json = 'module.exports = ' + JSON.stringify(js) + ';';
const outputPath = outputDir + '/' + name + '.js';
await fs.writeFile(outputPath, json);
}
async function main(argv) {
await fs.mkdirp(outputDir);
await copyJs('mermaid', __dirname + '/node_modules/mermaid/dist/mermaid.min.js');
}
main(process.argv).catch((error) => {
console.error(error);
process.exit(1);
});