jorgebucaran / classcat

Build a class attribute string quickly
MIT License
905 stars 22 forks source link

Don't publish the benchmark #21

Closed alexewerlof closed 6 years ago

alexewerlof commented 6 years ago

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 commented 6 years ago

@userpixel Good call, let's fix that.

jorgebucaran commented 6 years ago

So, I guess this is not enough?

https://github.com/jorgebucaran/classcat/blob/67f66031e3beecb232c1955ce829b8b28029a1d3/package.json#L11-L15

jorgebucaran commented 6 years ago

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 commented 6 years ago

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.