dice-roller/rpg-dice-roller

Reduce package size

Offen

#110 geöffnet am 27.04.2020

 (22 Kommentare) (0 Reaktionen) (1 zugewiesene Person)JavaScript (68 Forks)auto 404
dependenciesenhancementhelp wantedtesting

Repository-Metriken

Stars
 (279 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Is your feature request related to a problem? Please describe. The NPM bundle size is higher than I'd like and I think there's a lot of superfluous files in there, such as the .travis.yml file, the demo files etc. These files are handy for working on the library, but not needed for working with the library.

Describe the solution you'd like We should use either an .npmignore file to exclude files we don't want in the package, or add a whitelist of files to include in the package.json file.

It may also be worth completely removing the demo files as everything is explained in detail in the readme.

There's also an argument that the source files and tests should be excluded, but I'm uncertain what's best here.

Updated table of package sizes as calculated by various things:

v4.5.1 v5.4.1 LatestLatest version NextNext version
NPM tarball package size: 329.1 kBunpacked size: 1.7 MB package size: 107.0 kB unpacked size: 580.4 kB package size: 108.1 kB unpacked size: 588.6 kB
Bundlephobia Bundlephobia minified 4.5.1Bundlephobia minified + gzip 4.5.1 Bundlephobia minified 5.4.1Bundlephobia minified + gzip 5.4.1 Bundlephobia minified LatestBundlephobia minified + gzip Latest Bundlephobia minified NextBundlephobia minified + gzip Next
Packagephobia Packagephobia install size 4.5.1 Packagephobia install size Packagephobia install size Packagephobia install size

Contributor Guide