Angular CLI Config Schema

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

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.

相关帖子

欢迎来到这里!

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

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

推荐标签 标签

  • 周末

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

    14 引用 • 297 回帖
  • 机器学习

    机器学习(Machine Learning)是一门多领域交叉学科,涉及概率论、统计学、逼近论、凸分析、算法复杂度理论等多门学科。专门研究计算机怎样模拟或实现人类的学习行为,以获取新的知识或技能,重新组织已有的知识结构使之不断改善自身的性能。

    76 引用 • 37 回帖
  • Swift

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

    34 引用 • 37 回帖 • 507 关注
  • Rust

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

    58 引用 • 22 回帖 • 3 关注
  • RYMCU

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

    4 引用 • 6 回帖 • 50 关注
  • BAE

    百度应用引擎(Baidu App Engine)提供了 PHP、Java、Python 的执行环境,以及云存储、消息服务、云数据库等全面的云服务。它可以让开发者实现自动地部署和管理应用,并且提供动态扩容和负载均衡的运行环境,让开发者不用考虑高成本的运维工作,只需专注于业务逻辑,大大降低了开发者学习和迁移的成本。

    19 引用 • 75 回帖 • 618 关注
  • ActiveMQ

    ActiveMQ 是 Apache 旗下的一款开源消息总线系统,它完整实现了 JMS 规范,是一个企业级的消息中间件。

    19 引用 • 13 回帖 • 644 关注
  • LaTeX

    LaTeX(音译“拉泰赫”)是一种基于 ΤΕΧ 的排版系统,由美国计算机学家莱斯利·兰伯特(Leslie Lamport)在 20 世纪 80 年代初期开发,利用这种格式,即使使用者没有排版和程序设计的知识也可以充分发挥由 TeX 所提供的强大功能,能在几天,甚至几小时内生成很多具有书籍质量的印刷品。对于生成复杂表格和数学公式,这一点表现得尤为突出。因此它非常适用于生成高印刷质量的科技和数学类文档。

    9 引用 • 32 回帖 • 152 关注
  • sts
    2 引用 • 2 回帖 • 162 关注
  • 一些有用的避坑指南。

    69 引用 • 93 回帖
  • Kotlin

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

    19 引用 • 33 回帖 • 43 关注
  • 服务器

    服务器,也称伺服器,是提供计算服务的设备。由于服务器需要响应服务请求,并进行处理,因此一般来说服务器应具备承担服务并且保障服务的能力。

    124 引用 • 580 回帖
  • HTML

    HTML5 是 HTML 下一个的主要修订版本,现在仍处于发展阶段。广义论及 HTML5 时,实际指的是包括 HTML、CSS 和 JavaScript 在内的一套技术组合。

    103 引用 • 294 回帖
  • gRpc
    10 引用 • 8 回帖 • 51 关注
  • 尊园地产

    昆明尊园房地产经纪有限公司,即:Kunming Zunyuan Property Agency Company Limited(简称“尊园地产”)于 2007 年 6 月开始筹备,2007 年 8 月 18 日正式成立,注册资本 200 万元,公司性质为股份经纪有限公司,主营业务为:代租、代售、代办产权过户、办理银行按揭、担保、抵押、评估等。

    1 引用 • 22 回帖 • 703 关注
  • 生活

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

    229 引用 • 1450 回帖
  • SOHO

    为成为自由职业者在家办公而努力吧!

    7 引用 • 55 回帖 • 65 关注
  • 正则表达式

    正则表达式(Regular Expression)使用单个字符串来描述、匹配一系列遵循某个句法规则的字符串。

    31 引用 • 94 回帖
  • 小薇

    小薇是一个用 Java 写的 QQ 聊天机器人 Web 服务,可以用于社群互动。

    由于 Smart QQ 从 2019 年 1 月 1 日起停止服务,所以该项目也已经停止维护了!

    34 引用 • 467 回帖 • 711 关注
  • Redis

    Redis 是一个开源的使用 ANSI C 语言编写、支持网络、可基于内存亦可持久化的日志型、Key-Value 数据库,并提供多种语言的 API。从 2010 年 3 月 15 日起,Redis 的开发工作由 VMware 主持。从 2013 年 5 月开始,Redis 的开发由 Pivotal 赞助。

    284 引用 • 247 回帖 • 148 关注
  • 博客

    记录并分享人生的经历。

    272 引用 • 2386 回帖
  • ReactiveX

    ReactiveX 是一个专注于异步编程与控制可观察数据(或者事件)流的 API。它组合了观察者模式,迭代器模式和函数式编程的优秀思想。

    1 引用 • 2 回帖 • 140 关注
  • 爬虫

    网络爬虫(Spider、Crawler),是一种按照一定的规则,自动地抓取万维网信息的程序。

    106 引用 • 275 回帖
  • Sym

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

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

    524 引用 • 4599 回帖 • 689 关注
  • Flume

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

    9 引用 • 6 回帖 • 608 关注
  • 新人

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

    51 引用 • 226 回帖
  • NetBeans

    NetBeans 是一个始于 1997 年的 Xelfi 计划,本身是捷克布拉格查理大学的数学及物理学院的学生计划。此计划延伸而成立了一家公司进而发展这个商用版本的 NetBeans IDE,直到 1999 年 Sun 买下此公司。Sun 于次年(2000 年)六月将 NetBeans IDE 开源,直到现在 NetBeans 的社群依然持续增长。

    78 引用 • 102 回帖 • 646 关注