Skip to content

chore: Add .npmignore #510

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

Closed
wants to merge 2 commits into from
Closed

chore: Add .npmignore #510

wants to merge 2 commits into from

Conversation

fb55
Copy link
Collaborator

@fb55 fb55 commented Apr 20, 2022

#508 didn't work as expected; this adds an .npmignore file that excludes all unwanted files.

fb55 added 2 commits April 20, 2022 12:06
#508 didn't work as expected; this adds an `.npmignore` file that excludes all unwanted files.
@fb55
Copy link
Collaborator Author

fb55 commented Apr 20, 2022

I accidentally published a version of parse5-html-rewriting-stream with .map files — this also bumps the version of that package.

@fb55
Copy link
Collaborator Author

fb55 commented Apr 20, 2022

Turns out this doesn't work either. Seems like ignores don't work with npm workspace publishes?

@fb55
Copy link
Collaborator Author

fb55 commented Apr 20, 2022

I'm going with local file removals before publishing for now.

@fb55 fb55 closed this Apr 20, 2022
@fb55 fb55 deleted the npmignore branch April 20, 2022 11:13
@wooorm
Copy link
Collaborator

wooorm commented Apr 20, 2022

P.S. you can npm pack locally to see what gets packed up.

We should use files over an .npmignore: allow-lists are better at all this than ignore lists. Too frequently too much is published without a warning. But if important files are forgotten, well that stuff breaks so you get a notice to fix it.

@wooorm
Copy link
Collaborator

wooorm commented Apr 20, 2022

Note: it’s one or the other.
And perhaps negated files don‘t work. Can you instead do dist/**/*.js instead if you want to include .js in dist/?

fb55 added a commit that referenced this pull request Apr 20, 2022
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