I'm a newbie in Angular. I came across the files tsconfig.app.json
, tsconfig.spec.json
when angular app was installed using Angular-CLI and found the following point useful from this link.
Both tsconfig.*.json files are for TypeScript configuration. tsconfig.app.json is used for compiling the code, while tsconfig.spec.json for compiling the tests.
My doubt is, can we completely exclude tsconfig.spec.json
file if we are not using any test environment? Or is tsconfig.spec.json
mandatory?
If you don't use tests, feel free to remove tsconfig.spec.json
.
Actually you can generate a new angular app without setting up test environment (karma, protractor and *.spec.ts
files)
for @angular/cli version 7,8,9 the command is:
ng new --minimal=true --skipTests=true your-app-name
for @angular/cli version 6:
ng new --minimal --skip-tests your-app-name
This will remove unnecessary complexity from configuration files which is a nice thing if you just started learning angular.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With