website
website copied to clipboard
[docs] Documentation for `pack` command is incorrect / incomplete.
The current docs for the pack command says
Creates a compressed gzip archive of package dependencies.
This would lead users to believe that it will make an archive of the "node_modules" directory (a package's dependencies).
Docs should explain that this command is for building an archive of the files array listed in package.json for publishing to a registry. Explain what files are included if files is not present in package.json. Explain what files are not included (node_modules, things listed by .gitignore, etc).
That's for me the most helpful explanation for the npm/yarn pack commands. https://docs.npmjs.com/files/package.json#files