TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Huge no. of files for Angular 2

110 pointsby isheneralmost 9 years ago

13 comments

paraditealmost 9 years ago
Interesting fact that I recently came across:<p>bower and many other npm packages, has some dependencies that eventually depends on a package called &quot;wordwrap&quot;.<p>And this &quot;wordwrap&quot; package somehow has its test folder exposed in npm.<p>The result:<p>Every single person using bower would have <i></i>one or more<i></i> copies of <i>In Praise of Idleness</i> by Bertrand Russell on your local machine, depending on how many of your projects has a npm dependency of this package:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;substack&#x2F;node-wordwrap&#x2F;blob&#x2F;master&#x2F;test&#x2F;idleness.txt" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;substack&#x2F;node-wordwrap&#x2F;blob&#x2F;master&#x2F;test&#x2F;i...</a><p>Don&#x27;t believe me? Try searching for &quot;In Praise of Idleness&quot; in Spotlight.<p>Edit: Someone had already sent a PR about this on GitHub: <a href="https:&#x2F;&#x2F;github.com&#x2F;substack&#x2F;node-wordwrap&#x2F;pull&#x2F;14" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;substack&#x2F;node-wordwrap&#x2F;pull&#x2F;14</a>
评论 #12209406 未加载
评论 #12209861 未加载
评论 #12209739 未加载
评论 #12209322 未加载
评论 #12210319 未加载
评论 #12209385 未加载
评论 #12209560 未加载
justinsaccountalmost 9 years ago
This person is counting the node_modules directory. While JS is a bit insane and this directory will have a ridiculous number of files, they are concerned:<p>&quot;because my deployment (google app engine) allows only 10K files&quot;<p>meaning, they don&#x27;t realize that node_modules is for development and not related to the application they would actually deploy.
评论 #12209266 未加载
评论 #12209226 未加载
agcontialmost 9 years ago
Evaluating a framework by the number of files its dependencies are broken into is a a pretty poor measure of quality.
评论 #12209235 未加载
royka118almost 9 years ago
I did a bit of investigation into angular2 dependancies. It has alot more than angular1 and react<p><a href="http:&#x2F;&#x2F;royka.github.io&#x2F;2016&#x2F;05&#x2F;03&#x2F;front-end-deps.html" rel="nofollow">http:&#x2F;&#x2F;royka.github.io&#x2F;2016&#x2F;05&#x2F;03&#x2F;front-end-deps.html</a>
评论 #12209308 未加载
keeganjwalmost 9 years ago
I started working with Laravel not long ago and found my project folder had 24,000+ files in it. And those don&#x27;t compile down before you deploy... it makes me feel like I&#x27;m working on the tip of an unstable iceberg. Who the hell knows what&#x27;s going on down there. No one person could possibly hope to know what it all actually does.
isheneralmost 9 years ago
32,000 files for a hello world... jeez, i&#x27;m going back to java.....
评论 #12209279 未加载
评论 #12209820 未加载
moderndeveloperalmost 9 years ago
babel 6 with jsx transformer used to install a comparable number of files due to module duplication. At one point it was a 100M install with some modules being duplicated 45 times. Much of this was the fault of npm 2. But with latest babel and npm 3 it&#x27;s now a 35M install with 5700 files over 814 directories. I guess that&#x27;s considered lean by modern standards.
评论 #12209582 未加载
评论 #12209711 未加载
currywurstalmost 9 years ago
Is there a &quot;distribution&quot; bundle convention for npm ? Analogous to static linking, it would be one .js file that would bind all dependencies into a bundle (e.g. gulp.dist.js) . In that case you would end up with a much smaller number of dependency files to manage.
评论 #12209492 未加载
jbverschooralmost 9 years ago
Why isn&#x27;t npm managing packages like ruby gems?<p>SHARED_DIR&#x2F;npm_modules&#x2F;NAME&#x2F;VERSION
评论 #12209470 未加载
inaccessiblealmost 9 years ago
Reminds me of this talk that I just watched: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=k56wra39lwA" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=k56wra39lwA</a>
fernandopjalmost 9 years ago
At first glance, I thought the title was &quot;Huge NO: on files for Angular 2&quot; - a vulnerability report on filesystem capabilities of Angular 2 and why it should be abandoned
douchealmost 9 years ago
Has npm finally figured out how to de-dupe dependencies? In one project, I have something like 47 copies of the same version of the same library, distributed at all levels of the node_modules hierarchy.<p>I try not to think about that JS tooling too hard, lest I start pulling my hair out and devolve into a screaming crazy person.
评论 #12209173 未加载
评论 #12209196 未加载
评论 #12209203 未加载
评论 #12209362 未加载
评论 #12209875 未加载
评论 #12224776 未加载
andrewclunnalmost 9 years ago
Okay, but when you run the build process, how big is the resulting distributable?
评论 #12210007 未加载