Khan / aphrodite

Framework-agnostic CSS-in-JS with support for server-side rendering, browser prefixing, and minimum CSS generation
5.35k stars 188 forks source link

improve npmignore #398

Open Brianzchen opened 3 years ago

Brianzchen commented 3 years ago

Update .npmignore file to not publish files and dirs that aren't used by consumers. This simplified the distributed binaries but the main motivation for this change is that .flowconfig is included when aphrodite is published. Which if I browse the files within node_modules, flow server will crash because it detects multiple upstream flow configs.

@lencioni @jlfwong

alii commented 3 years ago

Some people will not use npm to install the package (e.g. install from GitHub url) – would that still work if src is ignored?

Brianzchen commented 3 years ago

People shouldn't really be using src folder directly. I mean they can but general expectation is you import via the main export which points to the built lib + /no-important in aphrodites case.

But if there's a valid use case, happy to exclude and continue to ship src

alii commented 3 years ago

I'm really not sure I am not knowledgable enough on the topic, was purely a question if it would still work

Brianzchen commented 3 years ago

I'm really not sure I am not knowledgable enough on the topic, was purely a question if it would still work

Yep should still work. npmignore is just for files to ignore during the npm publish process