Scripts to download geonames.org data and convert to other formats.
The data from geonames.org is not committed to this repo.
This project gives you scripts to download and convert the original data into formats more friendly to JavaScript/TypeScript projects.
You should copy only the generated files you need into your projects and update on your own schedule.
See: https://download.geonames.org/export/dump/
The following files are downloaded and converted.
countryInfo.txt
timeZones.txt
admin1CodesASCII.txt
admin2Codes.txt
- Continent codes are also generated.
npm install
npm run download
Generate .json
files in data/json
.
npm run generate-json
Generate .ts
files with interfaces in data/typescript
.
npm run generate-ts
Generate .mjs
files with JSDoc comments in data/esm
.
npm run generate-esm
Generate .js
files with JSDoc comments in data/cjs
.
npm run generate-cjs
Generate all file formats.
npm run generate-all