Angular CLI Config Schema

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

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.

相关帖子

欢迎来到这里!

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

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

推荐标签 标签

  • 新人

    让我们欢迎这对新人。哦,不好意思说错了,让我们欢迎这位新人!
    新手上路,请谨慎驾驶!

    52 引用 • 228 回帖
  • gRpc
    11 引用 • 9 回帖 • 102 关注
  • Follow
    4 引用 • 12 回帖 • 7 关注
  • Hexo

    Hexo 是一款快速、简洁且高效的博客框架,使用 Node.js 编写。

    22 引用 • 148 回帖 • 9 关注
  • Logseq

    Logseq 是一个隐私优先、开源的知识库工具。

    Logseq is a joyful, open-source outliner that works on top of local plain-text Markdown and Org-mode files. Use it to write, organize and share your thoughts, keep your to-do list, and build your own digital garden.

    7 引用 • 69 回帖 • 5 关注
  • webpack

    webpack 是一个用于前端开发的模块加载器和打包工具,它能把各种资源,例如 JS、CSS(less/sass)、图片等都作为模块来使用和处理。

    42 引用 • 130 回帖 • 253 关注
  • RabbitMQ

    RabbitMQ 是一个开源的 AMQP 实现,服务器端用 Erlang 语言编写,支持多种语言客户端,如:Python、Ruby、.NET、Java、C、PHP、ActionScript 等。用于在分布式系统中存储转发消息,在易用性、扩展性、高可用性等方面表现不俗。

    49 引用 • 60 回帖 • 353 关注
  • IBM

    IBM(国际商业机器公司)或万国商业机器公司,简称 IBM(International Business Machines Corporation),总公司在纽约州阿蒙克市。1911 年托马斯·沃森创立于美国,是全球最大的信息技术和业务解决方案公司,拥有全球雇员 30 多万人,业务遍及 160 多个国家和地区。

    17 引用 • 53 回帖 • 143 关注
  • Google

    Google(Google Inc.,NASDAQ:GOOG)是一家美国上市公司(公有股份公司),于 1998 年 9 月 7 日以私有股份公司的形式创立,设计并管理一个互联网搜索引擎。Google 公司的总部称作“Googleplex”,它位于加利福尼亚山景城。Google 目前被公认为是全球规模最大的搜索引擎,它提供了简单易用的免费服务。不作恶(Don't be evil)是谷歌公司的一项非正式的公司口号。

    49 引用 • 192 回帖 • 1 关注
  • Quicker

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

    37 引用 • 157 回帖 • 1 关注
  • 京东

    京东是中国最大的自营式电商企业,2015 年第一季度在中国自营式 B2C 电商市场的占有率为 56.3%。2014 年 5 月,京东在美国纳斯达克证券交易所正式挂牌上市(股票代码:JD),是中国第一个成功赴美上市的大型综合型电商平台,与腾讯、百度等中国互联网巨头共同跻身全球前十大互联网公司排行榜。

    14 引用 • 102 回帖 • 314 关注
  • 链滴

    链滴是一个记录生活的地方。

    记录生活,连接点滴

    183 引用 • 3885 回帖
  • 996
    13 引用 • 200 回帖 • 1 关注
  • Unity

    Unity 是由 Unity Technologies 开发的一个让开发者可以轻松创建诸如 2D、3D 多平台的综合型游戏开发工具,是一个全面整合的专业游戏引擎。

    25 引用 • 7 回帖 • 119 关注
  • Swift

    Swift 是苹果于 2014 年 WWDC(苹果开发者大会)发布的开发语言,可与 Objective-C 共同运行于 Mac OS 和 iOS 平台,用于搭建基于苹果平台的应用程序。

    34 引用 • 37 回帖 • 559 关注
  • 房星科技

    房星网,我们不和没有钱的程序员谈理想,我们要让程序员又有理想又有钱。我们有雄厚的房地产行业线下资源,遍布昆明全城的 100 家门店、四千地产经纪人是我们坚实的后盾。

    6 引用 • 141 回帖 • 610 关注
  • OneDrive
    2 引用 • 5 关注
  • Sym

    Sym 是一款用 Java 实现的现代化社区(论坛/BBS/社交网络/博客)系统平台。

    下一代的社区系统,为未来而构建

    524 引用 • 4601 回帖 • 710 关注
  • 周末

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

    14 引用 • 297 回帖
  • Swagger

    Swagger 是一款非常流行的 API 开发工具,它遵循 OpenAPI Specification(这是一种通用的、和编程语言无关的 API 描述规范)。Swagger 贯穿整个 API 生命周期,如 API 的设计、编写文档、测试和部署。

    26 引用 • 35 回帖 • 2 关注
  • 服务

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

    41 引用 • 24 回帖
  • Git

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

    211 引用 • 358 回帖 • 2 关注
  • 数据库

    据说 99% 的性能瓶颈都在数据库。

    346 引用 • 757 回帖 • 1 关注
  • Rust

    Rust 是一门赋予每个人构建可靠且高效软件能力的语言。Rust 由 Mozilla 开发,最早发布于 2014 年 9 月。

    59 引用 • 22 回帖 • 6 关注
  • WebSocket

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

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

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

    187 引用 • 832 回帖
  • 微服务

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

    96 引用 • 155 回帖 • 1 关注