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

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

问题描述

我已经开始在一个新的 Angular 2 项目中使用 angular-cli.启动项目生成了很多配置文件,我不是 100% 确定所有文件的用途,也找不到全面的文档.

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.

以下文件的用途是什么?

What are the following files for?

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:打字稿代码的静态 linting 设置.(例如确保单引号/双引号)
  • tsconfig.json:打字稿编译器的设置,例如编译为 es5 或 es6(默认设置,其他人继承自):
    • tsconfig.app.json:应用设置
    • tsconfig.spec.json:单元测试设置
    • tsconfig.e2e.json:端到端测试(网络测试)的设置

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

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