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

Include only needed files to npm package #52

Open
rubiesonthesky opened this issue Feb 10, 2025 · 0 comments
Open

Include only needed files to npm package #52

rubiesonthesky opened this issue Feb 10, 2025 · 0 comments

Comments

@rubiesonthesky
Copy link

rubiesonthesky commented Feb 10, 2025

Hi!

It seems that this package is 444 kB by npm's report.

I think there are a lot unnecessary files included in the published package: https://www.npmjs.com/package/@lezer/markdown?activeTab=code

For example

  • .mocharc.cjs
  • CHANGELOG.md (could be included, but could be just linked to repo)
  • build.js
  • rollup.config.js
  • tsconfig.json
  • test dir
  • bin dir only includes build-readme script?
  • src/README.md seems same as ./README.md?

So only files that should be included in ´files` section in package.json seem to be

  • dist
  • README.md
  • package.json

There may be other files to be included depending on your preferences. But I think usually only these files are needed :) That probably about halves the package size.

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

No branches or pull requests

1 participant