为每个Angular项目生成大量文件 [英] Huge number of files generated for every Angular project

查看:184
本文介绍了为每个Angular项目生成大量文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为Angular创建一个简单的hello world应用程序。

I wanted to start a simple hello world app for Angular.

当我按照官方的说明 quickstart 安装在我的项目中创建了32,000个文件。

When I followed the instructions in the official quickstart the installation created 32,000 files in my project.

我认为这是有些错误或者我错过了什么,所以我决定使用 angular-cli ,但在设置项目后我算了41,000个文件。

I figured this is some mistake or I missed something, so I decided to use angular-cli, but after setting up the project I counted 41,000 files.

我哪里出错了?我错过了一些非常明显的东西吗?

Where did I go wrong? Am I missing something really really obvious?

推荐答案

您的配置没有任何问题。

There is nothing wrong with your configuration.

Angular(自2.0版开始)使用npm模块和依赖项进行开发。这是你看到如此大量文件的唯一原因。

Angular (since version 2.0) uses npm modules and dependencies for development. That's the sole reason you are seeing such a huge number of files.

Angular的一个基本设置包含转换器,依赖于必需的依赖关系仅用于开发目的。

A basic setup of Angular contains transpiler, typings dependencies which are essential for development purposes only.

完成开发后,您需要做的就是捆绑此应用程序。

Once you are done with development, all you will need to do is to bundle this application.

捆绑您的应用程序后,将只有一个 bundle.js 文件,您可以在该服务器上部署该文件。

After bundling your application, there will be only one bundle.js file which you can then deploy on your server.

'transpiler'只是一个编译器,感谢@omninonsense添加它。

'transpiler' is just a compiler, thanks @omninonsense for adding that.

这篇关于为每个Angular项目生成大量文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆