globalizejs / globalize

A JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data
https://globalizejs.com
MIT License
4.8k stars 603 forks source link

Fix npmignore #658

Closed rxaviers closed 7 years ago

rxaviers commented 7 years ago

I've done several tests and was surprised by the several failed attempts to get files ignored in published package.

  1. Removed the invalid existing .npmignore.
  2. Merged the various .gitignores (from examples) into /.gitignore, but it didn't help. I don't understand why these entries are simply not taken into account by npm (tested v3.9.6 from node 5).
  3. Used negate expressions in package.json files entry worked, although it goes against recommendation:

"The consequences are undefined" if you try to negate any of the files entries (that is, "!foo.js"). Please don't. Use .npmignore.

https://github.com/npm/npm/wiki/Files-and-Ignores#details

PS: By the way, I used tar -tf $(npm pack) to test a publish, a workaround for a dry run.

rxaviers commented 7 years ago

out

rxaviers commented 7 years ago

Using this for now, we can revisit this in the future.