angular-cli和多个配置文件 [英] angular-cli and multiple configuration files

查看:65
本文介绍了angular-cli和多个配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开始将angular-cli用于新的Angular 2项目.入门项目会生成很多配置文件,我不确定所有文件的用途,也无法找到全面的文档.

I have started using angular-cli for a new Angular 2 project. The starter project generates lots of configuration files, I'm not 100% sure about the purpose of all the files, couldn't find comprehensive documentation too.

以下文件有哪些用途?

MyApp/
..tslint.json
..tsconfig.json
..protractor.conf.js
..package.json
..karma.conf.js
..angular-cli.json
..src/
  ..tsconfig.app.json
  ..tsconfig.spec.json
..e2e/
  ..tsconfig.e2e.json

推荐答案

这些是用于angular应用程序不同部分的配置文件:

Those are configuration files for different parts of your angular application:

  • tslint.json:用于打字稿代码静态掉毛的设置. (例如,确保单引号/双引号)
  • tsconfig.json:打字稿编译器的设置,例如编译为es5或es6(默认设置,其他人继承):
    • tsconfig.app.json:应用设置
    • tsconfig.spec.json:单元测试的设置
    • tsconfig.e2e.json:端到端测试(网络测试)的设置
    • tslint.json: settings for the static linting of your typescript code. (e.g. ensure single/double quotes)
    • tsconfig.json: settings for typescript compiler e.g. compiling to es5 or es6 (default settings, that others ineherit from):
      • tsconfig.app.json: settings for app
      • tsconfig.spec.json: settings for unit tests
      • tsconfig.e2e.json: settings for end to end tests (web tests)

      这篇关于angular-cli和多个配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆