onebeyond / systemic

📦 A minimal dependency injection framework.
https://onebeyond.github.io/systemic
MIT License
56 stars 7 forks source link

feat: npm publishing only relevant files #40

Closed danielherrerohernando closed 3 years ago

danielherrerohernando commented 3 years ago

What’s the focus of this PR

This PR is intended to remove from the npm published package all the files that are not relevant for consumers (eslintrc, travis...) keeping optional ones like the examples folder that may be useful at some point.

If you think the systemic's npm package should contain all these development files simply reject this PR but in my humble opinion, it would better to publish a clean package containing only the files that matter.

How to review this PR

Check how we can whitelist the files we want to include in the package by using the filesproperty in package.json, this way there is no need to have a npmignore file. blacklist all the unnecessary files by npmignoring them.

cressie176 commented 3 years ago

Hi @danielherrerohernando,

If we were to create another (necessary) file, is there anything that will remind us to add it to the white list?

danielherrerohernando commented 3 years ago

Hi @danielherrerohernando,

If we were to create another (necessary) file, is there anything that will remind us to add it to the white list?

@cressie176 No, that's the downside of this approach. If you think that's going to happen quite often in the future it's better to use the npmignore blacklisting approach

cressie176 commented 3 years ago

I think npmignore is a safer approach.

danielherrerohernando commented 3 years ago

@cressie176 ok, I've updated the PR accordingly, now just using .npmignore