创建没有默认工具包的 angular-cli 应用程序 [英] Create angular-cli app without default packages for tooling

查看:27
本文介绍了创建没有默认工具包的 angular-cli 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用@angular/cli 创建 angular 应用程序时,我发现还安装了其他几个软件包,例如:karma、protractor、jasmine 等

While creating an angular app with @angular/cli I found, several other packages are getting installed such as: karma, protractor, jasmine etc.

由于我是 angular 的初学者,我现在不需要这些额外的包.将来可能我会需要它们,或者可能是它们的不同组合,但现在肯定不会.

Since I am a beginner with angular I will not need these extra packages as of now. In future may be I will require them or may be a different combination of them but surely not as of now.

那么如何避免安装所有这些额外的工具包,而只安装学习 Angular 的必需品?

So how do I avoid installing all these extra tooling packages and just install essentials for learning Angular?

谢谢

推荐答案

docs 对于@angular/cli 状态,您可以在运行 ng new 时使用 minimal 标志,如下所示:

The docs for @angular/cli state that you can use the minimal flag when running ng new, like so:

ng new --minimal [name]

这将排除 karma 和量角器测试,并且不包括相应的 NPM 包.

This will exclude both karma and protractor tests and does not include the corresponding NPM packages.

如果你想更多地探索@angular/cli 的输出,你可能会从使用 --skip-install 标志中受益 - 这只会生成文件,但不会下载和安装所有软件包.您可以检查 package.json 文件以查看已添加的依赖项等,以了解发生了什么.

If you want to explore the output of @angular/cli a little more, you might benefit from using the --skip-install flag - This will just generate the files but will not download and install all the packages. You could inspect the package.json file to see the dependencies that have been added, etc, just to get a feel for what's going on.

这篇关于创建没有默认工具包的 angular-cli 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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