Skip to content

Commit

Permalink
chore: check less stuff into node_modules
Browse files Browse the repository at this point in the history
We bundle our deps, but we don't need to bundle docs, changelogs,
editorconfigs, test coverage reports, .github workflow definitions,
lint configurations, and all the rest, which we never use.

This cuts about 10% off of our publish artifact file size.

```
$ ls -laF npm-7.16.0-*.tgz
-rw-r--r--  1 isaacs  staff  7174497 Jun  3 13:01 npm-7.16.0-release-next.tgz
-rw-r--r--  1 isaacs  staff  6782377 Jun  3 13:00 npm-7.16.0-trim-node-modules.tgz

$ ls -laF npm-7.16.0-*.tar
-rw-r--r--  1 isaacs  staff  19020288 Jun  3 13:01 npm-7.16.0-release-next.tar
-rw-r--r--  1 isaacs  staff  17474048 Jun  3 13:00 npm-7.16.0-trim-node-modules.tar
```

PR-URL: #3362
Credit: @isaacs
Close: #3362
Reviewed-by: @nlf
  • Loading branch information
isaacs authored and wraithgar committed Jun 10, 2021
1 parent f130a81 commit a4a0e68
Show file tree
Hide file tree
Showing 364 changed files with 43 additions and 39,150 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ link: uninstall
node bin/npm-cli.js link -f --ignore-scripts

prune:
node bin/npm-cli.js run resetdeps
node bin/npm-cli.js prune --production --no-save --no-audit
@[[ "$(shell git status -s)" != "" ]] && echo "ERR: found unpruned files" && exit 1 || echo "git status is clean"

Expand Down
21 changes: 21 additions & 0 deletions node_modules/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

335 changes: 0 additions & 335 deletions node_modules/@npmcli/arborist/README.md

This file was deleted.

80 changes: 0 additions & 80 deletions node_modules/@npmcli/ci-detect/README.md

This file was deleted.

224 changes: 0 additions & 224 deletions node_modules/@npmcli/config/README.md

This file was deleted.

6 changes: 0 additions & 6 deletions node_modules/@npmcli/disparity-colors/CHANGELOG.md

This file was deleted.

49 changes: 0 additions & 49 deletions node_modules/@npmcli/disparity-colors/README.md

This file was deleted.

Loading

0 comments on commit a4a0e68

Please sign in to comment.