3 ms·
I think some of these stats are a bit misleading when it comes to js, and how GH calculates it. For instance, my project is mostly php (Laravel). It uses webpac
by cronix 8y ago
I think some of these stats are a bit misleading when it comes to js, and how GH calculates it. For instance, my project is mostly php (Laravel). It uses webpack to compile a few assets, really... a FEW (Vue + a few vue components + my custom code). However, those few dependencies pull in hundreds of other dependencies, which pull in a ton more and on it goes. When all is said and done and the js (my actual code) gets compiled, it's only like 50k of js, yet github classifies my project as "javascript" purely due to the number of dependencies, when in reality it's probably more like 3-5% of the entire codebase in terms of what is actually getting executed. It would be nice if you could tell GH which dir to look at to judge. For instance (with laravel) the compiled assets are placed in /public while the uncompiled assets are in /resources. I'd like it to only count JS located in /public, as that's accurate for my app in terms of js usage.
- kibwen 8y agoLast I checked this should be possible with some contortions on your end; Linguist (the tool GitHub uses to detect repo language) has some hardcoded paths which it will ignore for the purpose of counting lines of code. See this issue where Servo managed to convince GitHub to count it as a Rust project rather than an HTML project: https://github.com/servo/servo/issues/6332 https://github.com/servo/servo/issues/6332
- james_s_tayler 8y agoGiven that Resume Driven Development is (likely) heavily influenced by surveys like these as developer look at them and think "maybe I really should make the switch to everything JavaScript?". If what you say is true then js could actually become more popular than it really is in reality in some sort of bizarre, comical, global software development "fake it till you make it" kind of way.
- rbrcurtis 8y agoAre you committing your libs? If yes, you probably shouldn't. If no, then GitHub is only calculating your actual js LOC.