Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce the size of the published package #619

Merged
merged 1 commit into from
Nov 13, 2018

Conversation

futagoza
Copy link
Contributor

This PR simply adds a files field to the package.json so that the size of the published package is reduced by only including the files required (the bin and the dist folders).

Before: https://packagephobia.now.sh/result?p=showdown (All files from this repository included)

After:

$ npm publish --dry
npm notice
npm notice package: showdown@2.0.0-alpha1
npm notice === Tarball Contents ===
npm notice 1.6kB   package.json
npm notice 37.4kB  CHANGELOG.md
npm notice 1.1kB   LICENSE
npm notice 18.8kB  README.md
npm notice 47B     bin/showdown.js
npm notice 173.5kB dist/showdown.js
npm notice 489.0kB dist/showdown.js.map
npm notice 81.1kB  dist/showdown.min.js
npm notice 91.9kB  dist/showdown.min.js.map
npm notice === Tarball Details ===
npm notice name:          showdown
npm notice version:       2.0.0-alpha1
npm notice package size:  183.2 kB
npm notice unpacked size: 894.4 kB
npm notice shasum:        7fa92ad99d8c6962a6eeabe68700a99c454204e4
npm notice integrity:     sha512-pgMk7pliEMzaR[...]Q9wgfrcCdnijg==
npm notice total files:   9
npm notice
+ showdown@2.0.0-alpha1

@tivie tivie merged commit 82f90eb into showdownjs:develop Nov 13, 2018
@tivie
Copy link
Member

tivie commented Nov 13, 2018

Thanks

SyntaxRules pushed a commit that referenced this pull request Feb 1, 2022
Add files field to package.json so that the size of the published package is reduced by only including the files required (the bin and the dist folders)

Closes #619
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants