-
-
Notifications
You must be signed in to change notification settings - Fork 520
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
chore: add files
field for each package
#3284
chore: add files
field for each package
#3284
Conversation
Thank you for this @daydayhappychao!!! I'll give this a review soon as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @daydayhappychao, thanks for the PR!
These days we generally prefer using "files"
in package.json
over .npmignore
, and it's less likely to go stale. While this repo does have a .npmignore
, it's quite old and as you found not being used since the top-level package.json
isn't published and the other packages weren't using it.
Could this PR be refactored to add "files"
to each package.json
instead? Most of them will only need to include dist
. Apologies for requesting extra work, but I think that solution would be better long-term.
Great guide! I'll get this done soon. I agree that the |
@erickzhao @BlackHole1 @dsanders11 Please review carefully, I feel like it's dangerous to get it wrong, even though I've double-checked. |
files
field for each package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The files
field changes LGTM so far, thanks for making the change. I've updated the PR title to match.
I believe we also need to include "src"
for every package, sorry about that. @BlackHole1 pointed that out in an earlier comment but I forgot - there are some source maps in dist/
which refer back to the source files in src/
so we need to publish src/
as well.
Good idea. Pushing It was a useful experience! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks @daydayhappychao!
Summarize your changes:
There used to be a logic to sync
.npmignore
into the packages.forge/tools/link-ts.ts
Line 19 in 380762e
I restored it and updated the content of
.npmignore
.Please check if the content of
.npmignore
is reasonable. I'm not sure if theREADME.md
should be excluded from packages.