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

Don't publish the benchmark #21

Closed
alexewerlof opened this issue Apr 11, 2018 · 4 comments
Closed

Don't publish the benchmark #21

alexewerlof opened this issue Apr 11, 2018 · 4 comments
Labels
invalid This doesn't seem right

Comments

@alexewerlof
Copy link

alexewerlof commented Apr 11, 2018

The ./bench dir contains a benchmarking code that is not part of the module strictly speaking so it doesn't need to be published. On the same line of argument we can skip publishing the tests as well.

Suggested solution

Add an .npmignore file to the root with this content:

bench/
tests/

That's all! 👍

@jorgebucaran
Copy link
Owner

@userpixel Good call, let's fix that.

@jorgebucaran
Copy link
Owner

So, I guess this is not enough?

classcat/package.json

Lines 11 to 15 in 67f6603

"files": [
"src",
"dist",
"classcat.d.ts"
],

@jorgebucaran
Copy link
Owner

jorgebucaran commented Apr 11, 2018

The benchmarks are not published to npm as I'm using the files field in package.json which works similarly to .npmignore.

Case solved.

Proof screen shot 2018-04-11 at 22 42 47

@alexewerlof
Copy link
Author

I like your opt-in approach. According to https://docs.npmjs.com/files/package.json#files:

Files included with the "package.json#files" field cannot be excluded through .npmignore or .gitignore.

@jorgebucaran jorgebucaran added FIX invalid This doesn't seem right labels Apr 11, 2018
@jorgebucaran jorgebucaran removed the fix label Feb 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants