-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: collect hunspell dictionaries into a zip file and publish
- Loading branch information
1 parent
629e28f
commit a050fef
Showing
10 changed files
with
170 additions
and
19 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
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
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
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
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,60 @@ | ||
hunspell_dictionaries = [ | ||
"//third_party/hunspell_dictionaries/af-ZA-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/bg-BG-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/ca-ES-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/cs-CZ-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/cy-GB-1-0.bdic", | ||
"//third_party/hunspell_dictionaries/da-DK-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/de-DE-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/el-GR-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/en-AU-8-0.bdic", | ||
"//third_party/hunspell_dictionaries/en-CA-8-0.bdic", | ||
"//third_party/hunspell_dictionaries/en-GB-8-0.bdic", | ||
"//third_party/hunspell_dictionaries/en-US-8-0.bdic", | ||
"//third_party/hunspell_dictionaries/es-ES-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/et-EE-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/fa-IR-8-0.bdic", | ||
"//third_party/hunspell_dictionaries/fo-FO-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/fr-FR-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/he-IL-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/hi-IN-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/hr-HR-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/hu-HU-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/hy-1-0.bdic", | ||
"//third_party/hunspell_dictionaries/id-ID-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/it-IT-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/ko-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/lt-LT-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/lv-LV-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/nb-NO-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/nl-NL-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/pl-PL-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/pt-BR-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/pt-PT-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/ro-RO-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/ru-RU-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/sh-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/sh-4-0.bdic", | ||
"//third_party/hunspell_dictionaries/sk-SK-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/sl-SI-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/sq-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/sr-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/sr-4-0.bdic", | ||
"//third_party/hunspell_dictionaries/sv-SE-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/ta-IN-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/tg-TG-5-0.bdic", | ||
"//third_party/hunspell_dictionaries/tr-TR-4-0.bdic", | ||
"//third_party/hunspell_dictionaries/uk-UA-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/vi-VN-3-0.bdic", | ||
"//third_party/hunspell_dictionaries/xx-XX-3-0.bdic", | ||
] | ||
|
||
hunspell_licenses = [ | ||
"//third_party/hunspell_dictionaries/COPYING", | ||
"//third_party/hunspell_dictionaries/COPYING.Apache", | ||
"//third_party/hunspell_dictionaries/COPYING.LESSER", | ||
"//third_party/hunspell_dictionaries/COPYING.LGPL", | ||
"//third_party/hunspell_dictionaries/COPYING.MIT", | ||
"//third_party/hunspell_dictionaries/COPYING.MPL", | ||
"//third_party/hunspell_dictionaries/LICENSE", | ||
] |
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
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,35 @@ | ||
const fs = require('fs') | ||
const path = require('path') | ||
|
||
const check = process.argv.includes('--check') | ||
|
||
const dictsPath = path.resolve(__dirname, '..', '..', 'third_party', 'hunspell_dictionaries') | ||
const gclientPath = 'third_party/hunspell_dictionaries' | ||
|
||
const allFiles = fs.readdirSync(dictsPath) | ||
|
||
const dictionaries = allFiles | ||
.filter(file => path.extname(file) === '.bdic') | ||
|
||
const licenses = allFiles | ||
.filter(file => file.startsWith('LICENSE') || file.startsWith('COPYING')) | ||
|
||
const content = `hunspell_dictionaries = [ | ||
${dictionaries.map(f => `"//${path.posix.join(gclientPath, f)}"`).join(',\n ')} | ||
] | ||
hunspell_licenses = [ | ||
${licenses.map(f => `"//${path.posix.join(gclientPath, f)}"`).join(',\n ')} | ||
] | ||
` | ||
|
||
const filenamesPath = path.resolve(__dirname, '..', 'filenames.hunspell.gni') | ||
|
||
if (check) { | ||
const currentContent = fs.readFileSync(filenamesPath, 'utf8') | ||
if (currentContent !== content) { | ||
throw new Error('hunspell filenames need to be regenerated, latest generation does not match current file. Please run node gen-hunspell-filenames.js') | ||
} | ||
} else { | ||
fs.writeFileSync(filenamesPath, content) | ||
} |
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
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
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