Open dbendy opened 8 years ago
Hi @dbendy, thanks for bringing this up to my attention. I understand CLDR data is considerably large and re-downloading it is a tedious behavior, I agree this should be fixed.
One suggestion I have to address that is #28. Would you like to work on that? Thanks
@rxaviers: that solution will help if I have multiple apps on the same machine that all use CLDR data. I'm asking about the situation where I have just one app. If I do an npm install
within one app to pull down the cldr-data
and then, without deleting the data, do an npm install
again, all the data installs again. Why does this have to be? Normal npm
behavior is to only pull down missing modules. Why can't it look to see if there is an existing copy of the data first before installing all the data again?
Are using npm@3? If so, it's related to #31
No, actually we are still on npm@2. I assume that this has something to do with the fact that this module overrides the default npm install
behavior: https://github.com/rxaviers/cldr-data-npm/blob/master/package.json#L29
This package has a post-install script (definition), which you are pointing at, not an install override. Anyway, the problem must have something to do with it. The post-install script is responsible for the actual JSON files downloads and it should avoid re-downloading when unnecessary: it's the rxaviers/cldr-data-downloader. In order to debug the issue, you could try using the downloader directly, pass the node_modules/cldr-data as destination for the download and check whether it prevents re-downloading the JSON files.
I apologize if this is not the right place for this. My company is currently using
cldr-data
withGlobalize
. We notice that whenever someone does annpm install
, the data is downloaded again, even if it was previously downloaded. I assume that the defaultnpm install
behavior was overridden to make this happen. I am sure that this was done for a good reason but I am wondering what that reason was purely for my own understanding. Also, is there anything that can be done in order to change this behavior or simply to improve the developer experience? People are unhappy with the fact that thenpm install
time just increased by about 2 minutes. Thanks!