Angular CLI Config Schema

本贴最后更新于 2748 天前,其中的信息可能已经沧海桑田

Options

  • project: The global configuration of the project.

    • name (string): The name of the project.
    • ejected(boolean): Whether or not this project was ejected. Default is false.
  • apps (array): Properties of the different applications in this project.

    • name (string): Name of the app.
    • root (string): The root directory of the app.
    • outDir (string): The output directory for build results. Default is dist/.
    • assets (array): List of application assets.
    • deployUrl (string): URL where files will be deployed.
    • index (string): The name of the start HTML file. Default is index.html
    • main (string): The name of the main entry-point file.
    • polyfills (string): The name of the polyfills entry-point file. Loaded before the app.
    • test (string): The name of the test entry-point file.
    • tsconfig (string): The name of the TypeScript configuration file. Default is tsconfig.app.json.
    • testTsconfig (string): The name of the TypeScript configuration file for unit tests.
    • prefix (string): The prefix to apply to generated selectors.
    • serviceWorker (boolean): Experimental support for a service worker from @angular/service-worker. Default is false.
    • showCircularDependencies (boolean): Show circular dependency warnings on builds. Default is true.
    • styles (string|array): Global styles to be included in the build.
    • stylePreprocessorOptions : Options to pass to style preprocessors.
      • includePaths (array): Paths to include. Paths will be resolved to project root.
    • scripts (array): Global scripts to be included in the build.
    • environmentSource (string): Source file for environment config.
    • environments (object): Name and corresponding file for environment config.
  • e2e: Confirguration for end-to-end tests.

    • protractor
      • config (string): Path to the config file.
  • lint (array): Properties to be passed to TSLint.

    • files (string|array): File glob(s) to lint.
    • project (string): Location of the tsconfig.json project file. Will also use as files to lint if 'files' property not present.
    • tslintConfig (string): Location of the tslint.json configuration. Default is tslint.json.
    • exclude (string|array): File glob(s) to ignore.
  • test: Configuration for unit tests.

    • karma
      • config (string): Path to the karma config file.
    • codeCoverage
      • exclude (array): Globs to exclude from code coverage.
  • defaults: Specify the default values for generating.

    • styleExt (string): The file extension to be used for style files.
    • poll (number): How often to check for file updates.
    • class: Options for generating a class.
      • spec (boolean): Specifies if a spec file is generated. Default is false.
    • component: Options for generating a component.
      • flat (boolean): Flag to indicate if a dir is created. Default is false.
      • spec (boolean): Specifies if a spec file is generated. Default is true.
      • inlineStyle (boolean): Specifies if the style will be in the ts file. Default is false.
      • inlineTemplate (boolean): Specifies if the template will be in the ts file. Default is false.
      • viewEncapsulation (string): Specifies the view encapsulation strategy. Can be one of Emulated, Native or None.
      • changeDetection (string): Specifies the change detection strategy. Can be one of Default or OnPush.
    • directive: Options for generating a directive.
      • flat (boolean): Flag to indicate if a dir is created. Default is true.
      • spec (boolean): Specifies if a spec file is generated. Default is true.
    • guard: Options for generating a guard.
      • flat (boolean): Flag to indicate if a dir is created. Default is true.
      • spec (boolean): Specifies if a spec file is generated. Default is true.
    • interface: Options for generating a interface.
      • prefix (string): Prefix to apply to interface names. (i.e. I)
    • module: Options for generating a module.
      • flat (boolean): Flag to indicate if a dir is created. Default is false.
      • spec (boolean): Specifies if a spec file is generated. Default is false.
    • pipe: Options for generating a pipe.
      • flat (boolean): Flag to indicate if a dir is created. Default is true.
      • spec (boolean): Specifies if a spec file is generated. Default is true.
    • service: Options for generating a service.
      • flat (boolean): Flag to indicate if a dir is created. Default is true.
      • spec (boolean): Specifies if a spec file is generated. Default is true.
    • build: Properties to be passed to the build command.
      • sourcemaps (boolean): Output sourcemaps.
      • baseHref (string): Base url for the application being built.
      • progress (boolean): Log progress to the console while building. Default is true.
      • poll (number): Enable and define the file watching poll time period (milliseconds).
      • deleteOutputPath (boolean): Delete output path before build. Default is true.
      • preserveSymlinks (boolean): Do not use the real path when resolving modules. Default is false.
      • showCircularDependencies (boolean): Show circular dependency warnings on builds. Default is true.
      • namedChunks (boolean): Use file name for lazy loaded chunks.
    • serve: Properties to be passed to the serve command
      • port (number): The port the application will be served on. Default is 4200.
      • host (string): The host the application will be served on. Default is localhost.
      • ssl (boolean): Enables ssl for the application. Default is false.
      • sslKey (string): The ssl key used by the server. Default is ssl/server.key.
      • sslCert (string): The ssl certificate used by the server. Default is ssl/server.crt.
      • proxyConfig (string): Proxy configuration file.
  • packageManager (string): Specify which package manager tool to use. Options include npm, cnpm and yarn.

  • warnings: Allow people to disable console warnings.

    • nodeDeprecation (boolean): Show a warning when the node version is incompatible. Default is true.
    • packageDeprecation (boolean): Show a warning when the user installed angular-cli. Default is true.
    • versionMismatch (boolean): Show a warning when the global version is newer than the local one. Default is true.

相关帖子

欢迎来到这里!

我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。

注册 关于
请输入回帖内容 ...

推荐标签 标签

  • Dubbo

    Dubbo 是一个分布式服务框架,致力于提供高性能和透明化的 RPC 远程服务调用方案,是 [阿里巴巴] SOA 服务化治理方案的核心框架,每天为 2,000+ 个服务提供 3,000,000,000+ 次访问量支持,并被广泛应用于阿里巴巴集团的各成员站点。

    60 引用 • 82 回帖 • 610 关注
  • Git

    Git 是 Linux Torvalds 为了帮助管理 Linux 内核开发而开发的一个开放源码的版本控制软件。

    211 引用 • 358 回帖 • 1 关注
  • 周末

    星期六到星期天晚,实行五天工作制后,指每周的最后两天。再过几年可能就是三天了。

    14 引用 • 297 回帖 • 3 关注
  • Maven

    Maven 是基于项目对象模型(POM)、通过一小段描述信息来管理项目的构建、报告和文档的软件项目管理工具。

    186 引用 • 318 回帖 • 260 关注
  • Quicker

    Quicker 您的指尖工具箱!操作更少,收获更多!

    36 引用 • 155 回帖 • 1 关注
  • Flume

    Flume 是一套分布式的、可靠的,可用于有效地收集、聚合和搬运大量日志数据的服务架构。

    9 引用 • 6 回帖 • 653 关注
  • Gzip

    gzip (GNU zip)是 GNU 自由软件的文件压缩程序。我们在 Linux 中经常会用到后缀为 .gz 的文件,它们就是 Gzip 格式的。现今已经成为互联网上使用非常普遍的一种数据压缩格式,或者说一种文件格式。

    9 引用 • 12 回帖 • 170 关注
  • C

    C 语言是一门通用计算机编程语言,应用广泛。C 语言的设计目标是提供一种能以简易的方式编译、处理低级存储器、产生少量的机器码以及不需要任何运行环境支持便能运行的编程语言。

    85 引用 • 165 回帖
  • 生活

    生活是指人类生存过程中的各项活动的总和,范畴较广,一般指为幸福的意义而存在。生活实际上是对人生的一种诠释。生活包括人类在社会中与自己息息相关的日常活动和心理影射。

    230 引用 • 1454 回帖
  • 阿里云

    阿里云是阿里巴巴集团旗下公司,是全球领先的云计算及人工智能科技公司。提供云服务器、云数据库、云安全等云计算服务,以及大数据、人工智能服务、精准定制基于场景的行业解决方案。

    84 引用 • 324 回帖
  • 服务

    提供一个服务绝不仅仅是简单的把硬件和软件累加在一起,它包括了服务的可靠性、服务的标准化、以及对服务的监控、维护、技术支持等。

    41 引用 • 24 回帖
  • MySQL

    MySQL 是一个关系型数据库管理系统,由瑞典 MySQL AB 公司开发,目前属于 Oracle 公司。MySQL 是最流行的关系型数据库管理系统之一。

    692 引用 • 535 回帖
  • 招聘

    哪里都缺人,哪里都不缺人。

    189 引用 • 1057 回帖 • 1 关注
  • Caddy

    Caddy 是一款默认自动启用 HTTPS 的 HTTP/2 Web 服务器。

    12 引用 • 54 回帖 • 168 关注
  • Latke

    Latke 是一款以 JSON 为主的 Java Web 框架。

    71 引用 • 535 回帖 • 819 关注
  • 开源

    Open Source, Open Mind, Open Sight, Open Future!

    409 引用 • 3586 回帖
  • WebSocket

    WebSocket 是 HTML5 中定义的一种新协议,它实现了浏览器与服务器之间的全双工通信(full-duplex)。

    48 引用 • 206 回帖 • 296 关注
  • 游戏

    沉迷游戏伤身,强撸灰飞烟灭。

    180 引用 • 821 回帖
  • 微软

    微软是一家美国跨国科技公司,也是世界 PC 软件开发的先导,由比尔·盖茨与保罗·艾伦创办于 1975 年,公司总部设立在华盛顿州的雷德蒙德(Redmond,邻近西雅图)。以研发、制造、授权和提供广泛的电脑软件服务业务为主。

    8 引用 • 44 回帖
  • RYMCU

    RYMCU 致力于打造一个即严谨又活泼、专业又不失有趣,为数百万人服务的开源嵌入式知识学习交流平台。

    4 引用 • 6 回帖 • 54 关注
  • JSON

    JSON (JavaScript Object Notation)是一种轻量级的数据交换格式。易于人类阅读和编写。同时也易于机器解析和生成。

    52 引用 • 190 回帖 • 3 关注
  • ngrok

    ngrok 是一个反向代理,通过在公共的端点和本地运行的 Web 服务器之间建立一个安全的通道。

    7 引用 • 63 回帖 • 647 关注
  • CongSec

    本标签主要用于分享网络空间安全专业的学习笔记

    1 引用 • 1 回帖 • 23 关注
  • Excel
    31 引用 • 28 回帖
  • TextBundle

    TextBundle 文件格式旨在应用程序之间交换 Markdown 或 Fountain 之类的纯文本文件时,提供更无缝的用户体验。

    1 引用 • 2 回帖 • 73 关注
  • Kotlin

    Kotlin 是一种在 Java 虚拟机上运行的静态类型编程语言,由 JetBrains 设计开发并开源。Kotlin 可以编译成 Java 字节码,也可以编译成 JavaScript,方便在没有 JVM 的设备上运行。在 Google I/O 2017 中,Google 宣布 Kotlin 成为 Android 官方开发语言。

    19 引用 • 33 回帖 • 74 关注
  • V2Ray
    1 引用 • 15 回帖