claus / react-dat-gui

React dat.GUI
MIT License
292 stars 56 forks source link

Remove src directory from .npmignore #34

Closed lojjic closed 5 years ago

lojjic commented 5 years ago

This may spawn some discussion but I personally find it useful when NPM packages include the sources. Not only does it help with debugging, but projects with their own ES build pipelines can choose to consume the source files directly rather than the pre-transpiled results.

rohan-deshpande commented 5 years ago

Hmm sorry, I don't agree with this, we shouldn't be shipping source code with a distributable package. You can clone the git repo if you need to look at source no?

lojjic commented 5 years ago

I figured this may be controversial. ;)

I guess what I'm really asking for is that the distributable package include un-transpiled, un-polyfilled, un-bundled ES6 code that can be consumed directly. Many users will have their own build pipelines that can handle the ES6 compilation, dependency bundling, and polyfilling just fine in a way that they can control. For instance I do split builds where I produce an un-transpiled ES6 bundle with no polyfills for browsers that support it, and a separate bundle for older browsers. Only having access to a (very!) large pre-bundled ES5 file in the distributable package negates those optimizations.

Of course this ES6 I'm asking for doesn't have to be the src directory per se, it could be a separate build output (pull #33 gets closer), but the src would work just fine for my uses. Feel free to close this if you feel strongly about it but this would make react-dat-gui much more usable for me with no work on your part. Thanks for considering!

rohan-deshpande commented 5 years ago

33 has been merged into the develop branch, lemme know if this helps out?

lojjic commented 5 years ago

Thanks for the heads-up. Though that's not in npm yet, I did a local build and checked the output. It's a huge improvement and though it would still be nice to have untranspiled ES2015, this'll be good enough for me to use. I'll close this PR.