zamarrowski / react-ionicons

A React Ionicon component https://react-ionicons.netlify.app/
Apache License 2.0
192 stars 28 forks source link

Create .npmignore #47

Closed simonmeusel closed 4 years ago

simonmeusel commented 4 years ago

This package on npm is currently about 220 MB large. This is because the e. g. the docs is included in the npm bundle, which contributes most of the 220 MB. Thus, npm and each developer has to download and store this on disk, which is not necessary.

This adds a .npmignore to exclude all files except

*

!/lib
!/README*
!/LICENSE*
!/package*

from the npm package.

You may use the changes made in this PR under the conditions of this repositories license.

See https://npm.github.io/publishing-pkgs-docs/publishing/the-npmignore-file.html

This should lower the package significantly.

Please consider merging this PR and releasing a new version on npm.

zamarrowski commented 4 years ago

Thanks a lot for this commit bro 😄 I will merge and publish a new version in npm

zamarrowski commented 4 years ago

I changed the npmignore to:

docs/
src/
*.png

Because with the old npmignore file the folder lib was not in the published package.

Now the latest version is 3.1.3 and the size of the package is 1.1MB:

=== Tarball Details === 
name:          react-ionicons                          
version:       3.1.3                                   
package size:  1.1 MB                                  
unpacked size: 9.2 MB