If Angular is already global, why does it need all these files? And what are they doing?
Disclaimer: I am an old timer and really miss the just 'download and unzip' days of javascript and open source
> It’s true. Each installation of Babel includes a picture of Guy Fieri, and there is nothing you can do about it.
(1) https://medium.com/@jdan/i-peeked-into-my-node-modules-direc...
Vue, React, etc all use a transpiler to turn their code into code compatible with as many browsers as possible. The end result is that the syntactic sugar and niceties of the more modern JS specs get removed and replaced with their older counterparts. A popular tool for this is Babeljs.io
Modules themselves are new in browsers as well, so what actually tends to happen is that they don't just all get concatenated and use global variable scope but a module essentially becomes an enclosure, and all the enclosures are linked to one another at compile time. So there is usually no global variable called "Angular".
So if you generate an Angular app with their CLI, they pre-install all those build steps (along with Typescript, minification, etc). You get Angular using the transpiled module system out of the box.
https://medium.com/dirtyjs/why-angular-2-4-5-6-sucks-afb3656...
Sure, TS is a new language, but if you use ES6 the difference is not that big. And the "drawback" "to have an IDE for checking errors", that's a win in my book.
No matter how large or small the application type-checking and a more structured programming language is invaluable. Also, not having to wonder about what JS function will work in what browser.
Sure, for a simple app Angular might not be optimal, but if you're building anything substantial it is invaluable.
A casual peek into your node_modules folder will reveal packages such as left-pad, is-number, is-array etc. Stuff that is pre packaged into the runtime of any sane language. That's what makes up most of the bulk in any nodejs project.
In fact Angular team is working on new view engine (ngIvy) that shown to tree-shaken "Hello World" angular application down to 2.6kb.
IMO your reasoning for complaining is ridiculous, it's like saying "I hate C#, why do I need to download 6gb Visual Studio that has 64 thousand files in "Program Files/Visual Studio" folder to build C# application!".
https://blog.angularindepth.com/setting-up-angular-from-scra...
[edit] this does not work well with Angular 6 and also it reduces dependencies only to 100Mb
If you care a lot about size, you could use something like Vue.