I'm an experienced Java/Tomcat developer, experimenting with AngularJS for the first time. I don't know much about npm, node, yeoman, bower, etc. I followed a tutorial to download these tools and create a new AngularJS project.
I don't remember all the steps, but the part about creating the Angular project was this:
npm install generator-angular
yo angular
The resulting empty project is 307.9 megabytes.
By comparison, creating a new empty Tomcat application from IntelliJ is 45 kilobytes.
Am I doing something wrong? If not, does it seem reasonable that the 'lightweight' Angular project is thousands of times larger?
This is because the NPM package manager downloads the necessary dependencies to the node_module folder.
AngularJS is very different from 2+. For example, from version 2 onwards, they all use TypeScript, and to be able to load and compile everything you need Angular to work, it requires many libraries. However, if you use NPM, you can use the command npm run-build
which allows you to compile your view, generating an output folder called "output" or similar. In this way, those files are the ones that you should upload to your server, or give it importance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With