feat: include files in package.json for better distribution#159
feat: include files in package.json for better distribution#159bjohansebas wants to merge 1 commit intopkgjs:mainfrom
Conversation
| "files": [ | ||
| "lib", | ||
| "bin", | ||
| ".github/workflows/wiby.yaml", | ||
| "package-support.json" | ||
| ], |
There was a problem hiding this comment.
- the
filesfield is dangerous and should never be used;npmignoreis how files are kept out of the published package - tests should be published in a package so that
npm explore foo && npm install && npm testalways works - github workflows never need to be published.
There was a problem hiding this comment.
the files field is dangerous and should never be used; npmignore is how files are kept out of the published package
Sure, I also agree with that, but I see that many packages use files instead of .npmignore
tests should be published in a package so that npm explore foo && npm install && npm test always works
That's new to me, and it's the first time i've heard it. So, let's send the tests.
github workflows never need to be published.
with Wiby's current design, we need to send that file. I want to change the way Wiby runs in GitHub Actions, but that will take time.
There was a problem hiding this comment.
I'm confused why the published wiby tarball needs to contain a github action, since actions are only run from repos?
There was a problem hiding this comment.
By a command we used that copied that same GitHub Action, wiby github-workflow install
https://github.com/pkgjs/wiby/blob/main/USAGE.md#wiby-github-workflow-install
We are sending extra files, ideally, we should only send what is necessary to npm.