mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
Fetch wmf-sitematrix from CDN.. No need to depend on it anymore.
This commit is contained in:
@@ -21,7 +21,7 @@ export function coreData(context) {
|
||||
'phone_formats': 'data/phone_formats.min.json',
|
||||
'shortcuts': 'data/shortcuts.min.json',
|
||||
'territory_languages': 'data/territory_languages.min.json',
|
||||
'wikipedia': 'data/wikipedia.min.json'
|
||||
'wmf_sitematrix': 'https://cdn.jsdelivr.net/npm/wmf-sitematrix@0.1/wikipedia.min.json'
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ export function uiFieldWikipedia(field, context) {
|
||||
// be available the first time through, so things like the fetchers and
|
||||
// the language() function will not work immediately.
|
||||
let _dataWikipedia = [];
|
||||
context.data().get('wikipedia')
|
||||
context.data().get('wmf_sitematrix')
|
||||
.then(d => _dataWikipedia = d)
|
||||
.catch(() => { /* ignore */ });
|
||||
|
||||
|
||||
+1
-2
@@ -108,8 +108,7 @@
|
||||
"smash": "0.0",
|
||||
"static-server": "^2.2.1",
|
||||
"svg-sprite": "1.5.0",
|
||||
"uglify-js": "~3.7.1",
|
||||
"wmf-sitematrix": "0.1.4"
|
||||
"uglify-js": "~3.7.1"
|
||||
},
|
||||
"greenkeeper": {
|
||||
"label": "chore-greenkeeper",
|
||||
|
||||
@@ -87,6 +87,7 @@ function buildData() {
|
||||
'data/taginfo.json',
|
||||
'data/territory_languages.json',
|
||||
'dist/locales/en.json',
|
||||
'dist/data/*',
|
||||
'svg/fontawesome/*.svg',
|
||||
]);
|
||||
|
||||
@@ -97,7 +98,6 @@ 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);
|
||||
@@ -112,7 +112,6 @@ 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),
|
||||
|
||||
Reference in New Issue
Block a user