-
Notifications
You must be signed in to change notification settings - Fork 581
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Spellchecker): Dictionaries are now part of app instead of dynami…
…c download
- Loading branch information
Showing
9 changed files
with
370 additions
and
644 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,3 +42,5 @@ nsis: | |
protocols: | ||
name: Franz | ||
schemes: [franz] | ||
|
||
asarUnpack: "./dictionaries" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.