kinotto / geonames.js

Nodejs and Browser client for Geonames.org REST API :earth_africa:
http://www.geonames.org/export/client-libraries.html
MIT License
88 stars 17 forks source link

Ts refactor #5

Closed lamuertepeluda closed 6 years ago

lamuertepeluda commented 6 years ago

Hi @kinotto ,

I also made the .ts refactor. Sorry if it looks like a deep rewrite, I also added a prettier configuration.

Main Changes

Generated bundle sizes

Comparison of bundle sizes

Before

-rw-r--r--  1 vito  staff    16K Jul 25 12:18 geonames.min.js
-rw-r--r--  1 vito  staff   2.2K Jul 25 12:18 geonames.min.node.js

Now

total 56
-rw-r--r--  1 vito  staff   9.6K Jul 25 12:19 geonames.js
-rw-r--r--  1 vito  staff   8.0K Jul 25 12:19 geonames.js.map
-rw-r--r--  1 vito  staff   4.3K Jul 25 12:19 geonames.min.js

So now the minified version (which works on both node and browser) is slightly bigger in size than previous node version, but that may be due to umd an ts transpiling boilerplate. But it's still 1/4 of the prevous browser version! :)

kinotto commented 6 years ago

everything looks good, i will make some tiny changes on the doc and release the new version by tonight. thx again