By adding the files property to package.json, we can tell npm which files to distribute. Currently, all the configuration files (.editorconfig, .jshintrc) and all the test files are distributed with npm. This increases the size of the npm distribution beyond what it needs to be.
npm will automatically include the README.md and LICENSE files for you, along with the package.json file.
This change reduces the distribution from 219kb to just over 25kb. That's almost a 90% saving!
By adding the
files
property to package.json, we can tell npm which files to distribute. Currently, all the configuration files (.editorconfig
,.jshintrc
) and all the test files are distributed with npm. This increases the size of the npm distribution beyond what it needs to be.npm will automatically include the
README.md
andLICENSE
files for you, along with thepackage.json
file.This change reduces the distribution from 219kb to just over 25kb. That's almost a 90% saving!