Stop bundling wmf-sitematrix, move it extern

This also includes a bunch of tweaks to make the tests work
in both PhantomJS and modern browsers like Chrome.

Basically - introduce some more async into the test code so that
the coreData.get promise is guaranteed to settle.  Because in
PhantomJS the promise is polyfilled, and Chrome it's native, they
work slightly differently.
This commit is contained in:
Bryan Housel
2020-01-29 12:30:11 -05:00
parent 567eeac587
commit c481f90e7d
8 changed files with 366 additions and 324 deletions
+2
View File
@@ -97,6 +97,7 @@ function buildData() {
let translations = generateTranslations(fields, presets, tstrings, searchableFieldIDs);
let taginfo = generateTaginfo(presets, fields);
let territoryLanguages = generateTerritoryLanguages();
let wikipedia = require('wmf-sitematrix').wikipedia;
// Additional consistency checks
validateCategoryPresets(categories, presets);
@@ -111,6 +112,7 @@ function buildData() {
writeFileProm('data/presets.yaml', translationsToYAML(translations) ),
writeFileProm('data/taginfo.json', prettyStringify(taginfo, { maxLength: 9999 }) ),
writeFileProm('data/territory_languages.json', prettyStringify(territoryLanguages, { maxLength: 9999 }) ),
writeFileProm('dist/data/wikipedia.min.json', JSON.stringify(wikipedia)),
writeEnJson(tstrings),
writeFaIcons(faIcons),
writeTnpIcons(tnpIcons),