diff --git a/.gitignore b/.gitignore index ff2de5f05..eef4769b5 100644 --- a/.gitignore +++ b/.gitignore @@ -40,4 +40,5 @@ Tools/github_oauth_token.txt _releases ReactNativeClient/lib/csstojs/ ElectronClient/app/gui/note-viewer/fonts/ +ElectronClient/app/gui/note-viewer/lib.js Tools/commit_hook.txt \ No newline at end of file diff --git a/ElectronClient/app/compile-jsx.js b/ElectronClient/app/compile.js similarity index 86% rename from ElectronClient/app/compile-jsx.js rename to ElectronClient/app/compile.js index 4663c7454..e605cc60e 100644 --- a/ElectronClient/app/compile-jsx.js +++ b/ElectronClient/app/compile.js @@ -2,6 +2,7 @@ const fs = require('fs-extra'); const spawnSync = require('child_process').spawnSync; const babelPath = __dirname + '/node_modules/.bin/babel' + (process.platform === 'win32' ? '.cmd' : ''); +const basePath = __dirname + '/../..'; const guiPath = __dirname + '/gui'; function fileIsNewerThan(path1, path2) { @@ -27,7 +28,7 @@ fs.readdirSync(guiPath).forEach((filename) => { if (fileIsNewerThan(jsxPath, jsPath)) { console.info('Compiling ' + jsxPath + '...'); - const result = spawnSync(babelPath, ['--presets', 'react', '--out-file',jsPath, jsxPath]); + const result = spawnSync(babelPath, ['--presets', 'react', '--out-file', jsPath, jsxPath]); if (result.status !== 0) { const msg = []; if (result.stdout) msg.push(result.stdout.toString()); @@ -38,3 +39,5 @@ fs.readdirSync(guiPath).forEach((filename) => { } } }); + +fs.copySync(basePath + '/ReactNativeClient/lib/string-utils-common.js', __dirname + '/gui/note-viewer/lib.js'); diff --git a/ElectronClient/app/gui/note-viewer/index.html b/ElectronClient/app/gui/note-viewer/index.html index 49a84f1e4..9616a4d21 100644 --- a/ElectronClient/app/gui/note-viewer/index.html +++ b/ElectronClient/app/gui/note-viewer/index.html @@ -37,6 +37,7 @@
+