Skip to content

Commit

Permalink
Reduce package size by removing rule README files (#7361)
Browse files Browse the repository at this point in the history
For some reason, the `lib/rules/*/README.md` addition to the `files` field is necessary.

The following is the report by `npm pack --dry-run`: -37 kB (266.9 kB - 303.9 kB)

Before:

```
npm notice === Tarball Details ===
npm notice name:          stylelint
npm notice version:       16.0.0-3
npm notice filename:      stylelint-16.0.0-3.tgz
npm notice package size:  303.9 kB
npm notice unpacked size: 1.6 MB
npm notice shasum:        a403d04490cd9c56f0c5dfb9c0d42c4062dc8733
npm notice integrity:     sha512-s3x9tg3tEZyhy[...]a416SkvGgWtzg==
npm notice total files:   717
```

After:

```
npm notice === Tarball Details ===
npm notice name:          stylelint
npm notice version:       16.0.0-3
npm notice filename:      stylelint-16.0.0-3.tgz
npm notice package size:  266.9 kB
npm notice unpacked size: 1.4 MB
npm notice shasum:        ffbd39805a30e93df34a212516f82bc046d9a8c4
npm notice integrity:     sha512-qpEnfAapWVhXZ[...]vQBeKiN9VefKg==
npm notice total files:   592
```
  • Loading branch information
ybiquitous committed Nov 30, 2023
1 parent e7e5494 commit a83af3e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"lib/**/*.mjs",
"!**/__tests__/**",
"!lib/testUtils/**",
"!lib/rules/*/README.md",
"types/stylelint/index.d.ts"
],
"scripts": {
Expand Down

0 comments on commit a83af3e

Please sign in to comment.