Angular CLI Config Schema

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

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.

相关帖子

欢迎来到这里!

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

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

推荐标签 标签

  • 单点登录

    单点登录(Single Sign On)是目前比较流行的企业业务整合的解决方案之一。SSO 的定义是在多个应用系统中,用户只需要登录一次就可以访问所有相互信任的应用系统。

    9 引用 • 25 回帖 • 3 关注
  • JRebel

    JRebel 是一款 Java 虚拟机插件,它使得 Java 程序员能在不进行重部署的情况下,即时看到代码的改变对一个应用程序带来的影响。

    26 引用 • 78 回帖 • 679 关注
  • 工具

    子曰:“工欲善其事,必先利其器。”

    298 引用 • 763 回帖
  • Anytype
    3 引用 • 31 回帖 • 12 关注
  • Sphinx

    Sphinx 是一个基于 SQL 的全文检索引擎,可以结合 MySQL、PostgreSQL 做全文搜索,它可以提供比数据库本身更专业的搜索功能,使得应用程序更容易实现专业化的全文检索。

    1 引用 • 223 关注
  • Kubernetes

    Kubernetes 是 Google 开源的一个容器编排引擎,它支持自动化部署、大规模可伸缩、应用容器化管理。

    116 引用 • 54 回帖 • 2 关注
  • 微服务

    微服务架构是一种架构模式,它提倡将单一应用划分成一组小的服务。服务之间互相协调,互相配合,为用户提供最终价值。每个服务运行在独立的进程中。服务于服务之间才用轻量级的通信机制互相沟通。每个服务都围绕着具体业务构建,能够被独立的部署。

    96 引用 • 155 回帖
  • ZooKeeper

    ZooKeeper 是一个分布式的,开放源码的分布式应用程序协调服务,是 Google 的 Chubby 一个开源的实现,是 Hadoop 和 HBase 的重要组件。它是一个为分布式应用提供一致性服务的软件,提供的功能包括:配置维护、域名服务、分布式同步、组服务等。

    59 引用 • 29 回帖 • 3 关注
  • Node.js

    Node.js 是一个基于 Chrome JavaScript 运行时建立的平台, 用于方便地搭建响应速度快、易于扩展的网络应用。Node.js 使用事件驱动, 非阻塞 I/O 模型而得以轻量和高效。

    139 引用 • 269 回帖 • 1 关注
  • 开源中国

    开源中国是目前中国最大的开源技术社区。传播开源的理念,推广开源项目,为 IT 开发者提供了一个发现、使用、并交流开源技术的平台。目前开源中国社区已收录超过两万款开源软件。

    7 引用 • 86 回帖 • 1 关注
  • 资讯

    资讯是用户因为及时地获得它并利用它而能够在相对短的时间内给自己带来价值的信息,资讯有时效性和地域性。

    56 引用 • 85 回帖 • 1 关注
  • 分享

    有什么新发现就分享给大家吧!

    248 引用 • 1794 回帖 • 3 关注
  • PWA

    PWA(Progressive Web App)是 Google 在 2015 年提出、2016 年 6 月开始推广的项目。它结合了一系列现代 Web 技术,在网页应用中实现和原生应用相近的用户体验。

    14 引用 • 69 回帖 • 177 关注
  • 七牛云

    七牛云是国内领先的企业级公有云服务商,致力于打造以数据为核心的场景化 PaaS 服务。围绕富媒体场景,七牛先后推出了对象存储,融合 CDN 加速,数据通用处理,内容反垃圾服务,以及直播云服务等。

    28 引用 • 226 回帖 • 133 关注
  • 设计模式

    设计模式(Design pattern)代表了最佳的实践,通常被有经验的面向对象的软件开发人员所采用。设计模式是软件开发人员在软件开发过程中面临的一般问题的解决方案。这些解决方案是众多软件开发人员经过相当长的一段时间的试验和错误总结出来的。

    200 引用 • 120 回帖 • 4 关注
  • 旅游

    希望你我能在旅途中找到人生的下一站。

    95 引用 • 901 回帖
  • 知乎

    知乎是网络问答社区,连接各行各业的用户。用户分享着彼此的知识、经验和见解,为中文互联网源源不断地提供多种多样的信息。

    10 引用 • 66 回帖
  • 自由行
    6 关注
  • Gitea

    Gitea 是一个开源社区驱动的轻量级代码托管解决方案,后端采用 Go 编写,采用 MIT 许可证。

    5 引用 • 16 回帖 • 4 关注
  • 持续集成

    持续集成(Continuous Integration)是一种软件开发实践,即团队开发成员经常集成他们的工作,通过每个成员每天至少集成一次,也就意味着每天可能会发生多次集成。每次集成都通过自动化的构建(包括编译,发布,自动化测试)来验证,从而尽早地发现集成错误。

    15 引用 • 7 回帖
  • SpaceVim

    SpaceVim 是一个社区驱动的模块化 vim/neovim 配置集合,以模块的方式组织管理插件以
    及相关配置,为不同的语言开发量身定制了相关的开发模块,该模块提供代码自动补全,
    语法检查、格式化、调试、REPL 等特性。用户仅需载入相关语言的模块即可得到一个开箱
    即用的 Vim-IDE。

    3 引用 • 31 回帖 • 120 关注
  • Electron

    Electron 基于 Chromium 和 Node.js,让你可以使用 HTML、CSS 和 JavaScript 构建应用。它是一个由 GitHub 及众多贡献者组成的活跃社区共同维护的开源项目,兼容 Mac、Windows 和 Linux,它构建的应用可在这三个操作系统上面运行。

    15 引用 • 136 回帖
  • Linux

    Linux 是一套免费使用和自由传播的类 Unix 操作系统,是一个基于 POSIX 和 Unix 的多用户、多任务、支持多线程和多 CPU 的操作系统。它能运行主要的 Unix 工具软件、应用程序和网络协议,并支持 32 位和 64 位硬件。Linux 继承了 Unix 以网络为核心的设计思想,是一个性能稳定的多用户网络操作系统。

    952 引用 • 944 回帖
  • IDEA

    IDEA 全称 IntelliJ IDEA,是一款 Java 语言开发的集成环境,在业界被公认为最好的 Java 开发工具之一。IDEA 是 JetBrains 公司的产品,这家公司总部位于捷克共和国的首都布拉格,开发人员以严谨著称的东欧程序员为主。

    181 引用 • 400 回帖 • 1 关注
  • FlowUs

    FlowUs.息流 个人及团队的新一代生产力工具。

    让复杂的信息管理更轻松、自由、充满创意。

    1 引用 • 1 关注
  • Mobi.css

    Mobi.css is a lightweight, flexible CSS framework that focus on mobile.

    1 引用 • 6 回帖 • 760 关注
  • TGIF

    Thank God It's Friday! 感谢老天,总算到星期五啦!

    289 引用 • 4492 回帖 • 656 关注