-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multiple tsconfig files for different environments #8500
Comments
+1 |
+2 |
Dupe of #6109 |
this is already supported today. see https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the---project--p-flag-can-now-take-any-file-path for more details. |
Might I suggest an improvement to the documentation then? It is very unclear that -p can refer to a file. Believe me, I looked. 😀 |
Update documentation to point the option of using a file name as referenced in microsoft/TypeScript#8500
updated in microsoft/TypeScript-Handbook@fdd9621 |
Most tools allow you to specify a specific configuration file if desired. For example, with Karma, the default config file is karma.conf.js, but you can pass a different file to the command line to target a different file. This lets you have multiple configurations for different environments.
The primary use case for this is test environments. Often the compilation settings and more specifically the files (type definitions!) included are very different.
When the test environment has to share the same tsconfig with the application, sometimes ambient type definitions for test libraries have to be included with the application build. This could easily result in a
spyOn()
jasmine call passing the application build and failing hard at run time.It would be really nice to have a
tsconfig.tests.json
next to the applicationtsconfig.json
.The text was updated successfully, but these errors were encountered: