--minimal 在 angular-cli `ng new` 中有什么作用? [英] What does --minimal do in angular-cli `ng new`?
本文介绍了--minimal 在 angular-cli `ng new` 中有什么作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Angular CLI 有一个名为 --minimal
的选项.它有什么作用,它在哪里记录?命令 ng help new
几乎没有说明
The Angular CLI has an option called --minimal
. What does it do and where is it documented? The command ng help new
says very little about it
--minimal (Boolean) (Default: false) Should create a minimal app.
aliases: --minimal
推荐答案
截至 2017 年 7 月 31 日 一个常规的 Angular 应用程序生成 5 个目录、26 个文件.一个--minimal
生成4个目录,13个文件
.区别?--minimal
通过启用一些其他选项来排除生成多个文件.
Current as of July 31, 2017 A regular angular app generates 5 directories, 26 files. A --minimal
generates 4 directories, 13 files
. The difference? --minimal
excludes generation of multiple files by enabling some other options.
- 您可以在 代码在这里
--skip-tests
:停止生成测试(即 e2e、karma.conf.js
、protractor.conf.js
和*.spec.
文件),包括tsconfig.spec.json
、app.component.spec.ts
>--inline-style
:停止生成外部 css 存根,而是在.ts
文件中保留一个空字符串.立>--inline-template
:停止生成外部 html,而是将其保存在.ts 中的
文件.template
变量中
- You can see this in the code here
--skip-tests
: stops the generation of testing (viz. e2e,karma.conf.js
,protractor.conf.js
, and*.spec.
files) includingtsconfig.spec.json
,app.component.spec.ts
--inline-style
: stops the generation of external css stubs instead keeping an empty string in the.ts
file.--inline-template
: stops the generation of external html instead keeping it in thetemplate
variable in the.ts
file.
README.md
- tsconfig 和 tslint
- favicon.ico
这里是在没有
--minimal
my-app/ ├── e2e │ ├── app.e2e-spec.ts │ ├── app.po.ts │ └── tsconfig.e2e.json ├── karma.conf.js ├── package.json ├── package-lock.json ├── protractor.conf.js ├── README.md ├── src │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ └── app.module.ts │ ├── assets │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── typings.d.ts ├── tsconfig.json └── tslint.json
--minimal
执行以下操作├── package.json ├── package-lock.json ├── src │ ├── app │ │ ├── app.component.ts │ │ └── app.module.ts │ ├── assets │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── tsconfig.app.json │ └── typings.d.ts └── tsconfig.json
这篇关于--minimal 在 angular-cli `ng new` 中有什么作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文