country-regions/country-region-data

Minify data.json

Closed this issue · 1 comments

The current version of https://github.com/country-regions/country-region-data/blob/master/data.json (and https://github.com/country-regions/country-region-data/blob/master/data.js) is huge in size. It will be great to have minified version of the files. It can be generated by a new grunt task.

Moreover, we may use another structure to store regions in the minified files: use shortCode values as the key of the object of regions (it is an array for now), this will save much space.

Thanks @nevmerzhitsky - agreed.

v2.0.0 now exports the info in tree-shakeable es6 format as well as UMD and the raw JSON. The es6 format is as small as can be, I think.