Make several data external instead of bundled:

Also dist/data/* contains minified files now

These are now external and will fetch as needed:
-export { dataAddressFormats } from './address-formats.json';
-export { dataDeprecated } from './deprecated.json';
-export { dataDiscarded } from './discarded.json';
-export { dataLanguages } from './languages.json';
-export { dataPhoneFormats } from './phone-formats.json';
-export { dataShortcuts } from './shortcuts.json';
-export { dataTerritoryLanguages } from './territory-languages.json';
This commit is contained in:
Bryan Housel
2020-01-28 22:21:31 -05:00
parent 3ac800c619
commit 567eeac587
40 changed files with 2815 additions and 3193 deletions
+14
View File
@@ -1,6 +1,19 @@
describe('iD.uiFieldLocalized', function() {
var context, selection, field;
before(function() {
iD.data.languages = {
de: { nativeName: 'Deutsch' },
en: { nativeName: 'English' }
};
iD.data.territory_languages = {};
});
after(function() {
delete iD.data.languages;
delete iD.data.territory_languages;
});
beforeEach(function() {
context = iD.coreContext();
selection = d3.select(document.createElement('div'));
@@ -8,6 +21,7 @@ describe('iD.uiFieldLocalized', function() {
field.locked = function() { return false; };
});
it('adds a blank set of fields when the + button is clicked', function() {
var localized = iD.uiFieldLocalized(field, context);
selection.call(localized);