Poking around some open source code: Why do people want 20 files with only 8 lines of code in each file instead of a single index.js w/ 150 lines?
-
Show this thread
-
Replying to @ryanflorence
i feel attacked lol https://github.com/ricokahler/color2k/blob/master/packages/color2k/src/adjustHue.ts …
1 reply 0 retweets 9 likes -
Replying to @ricokahler
drop all of that in a single file and see how it feels. Also, half your code will melt away because it's all just import/export
1 reply 0 retweets 11 likes -
Replying to @ryanflorence
That's what I make rollup do so I just ran it through that lol: https://gist.github.com/ricokahler/de697f10d1d8cc4e89a1f0bb16630072 … It's not bad but the size of my corresponding test file can be significantly larger than the implementation so I guess that's my real answer to why I don't throw them into one big file.
4 replies 0 retweets 7 likes
You can use multiple test files if it helps organization, even if there’s only one source file
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
