Permalink
Browse files

fix(Spellchecker): Dictionaries are now part of app instead of dynami…

…c download
  • Loading branch information...
adlk committed Dec 7, 2018
1 parent ed1554f commit 0cdc165ace53019371fc126d8d76817f1f2ed027
@@ -0,0 +1,24 @@
const { execSync } = require('child_process');
const { SPELLCHECKER_LOCALES } = require('../build/i18n/languages');

const path = './build/dictionaries';

let packages = '';
Object.keys(SPELLCHECKER_LOCALES).forEach((key) => { packages = `${packages} hunspell-dict-${key}`; });

function exec(cmd) {
execSync(cmd,
(error, stdout, stderr) => {
console.log(`stdout: ${stdout}`);
console.log(`stderr: ${stderr}`);
if (error !== null) {
console.log(`exec error: ${error}`);
}
});
}

exec(`
rm -rf ${path}
npm install --prefix ${path} ${packages}
mv ${path}/node_modules/* ${path}
rm -rf ${path}/node_modules ${path}/package-lock.json`);
@@ -42,3 +42,5 @@ nsis:
protocols:
name: Franz
schemes: [franz]

asarUnpack: "./dictionaries"
@@ -137,7 +137,6 @@ export function sign(done) {
}

const build = gulp.series(
clean,
gulp.parallel(mvSrc, mvPackageJson),
gulp.parallel(html, scripts, styles),
);
Oops, something went wrong.

0 comments on commit 0cdc165

Please sign in to comment.