Include only needed files to npm package #52

Open
opened 2025-02-10 12:13:25 +01:00 by rubiesonthesky · 0 comments
rubiesonthesky commented 2025-02-10 12:13:25 +01:00 (Migrated from github.com)

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.

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 in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lezer/markdown#52
No description provided.