Spittal / vue-i18n-extract

Manage vue-i18n localization with static analysis
https://pixari.github.io/vue-i18n-extract/#what-is-it
MIT License
313 stars 86 forks source link

refactor: only package necessary files #172

Closed kleinfreund closed 2 years ago

kleinfreund commented 2 years ago

Adds the files property to the package.json file including the paths bin and dist which contain the essential distribution files of the package. Previously, the entire source code was packaged with the files uploaded to npm (for comparison, run npm pack with and without this change). This unnecessarily bloats a consuming project’s dependency storage (e.g. node_modules).


Caution: This could be considered a breaking change. While unlikely, it could be that consumers of this package make use of the files as they’re currently being distributed. This is quite unlikely as the source code is written in TypeScript which prevents people from directly importing and using the source code without also compiling the files to JavaScript. Nevertheless, there is always a risk associated to a change like this. Personally, I would probably not consider this a breaking change as all functionality can be accessed using files provided in the dist and bin directories.

Spittal commented 2 years ago

This is great, thanks! I think I might go up a major version next, just in case!