-
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 sub-projects within a single tsconfig.json #1928
Comments
I'm looking for some way to more easily manage this too. I like the idea of having unit tests along side the source file because it makes the /// file references easier (rather than ../../../src/feature/file.ts). I might be interested in just creating different tsconfig files (e.g. tsconfig-app.json, tsconfig-unit.json) which should work with the -p project spec. |
I need a feature like this, to possibly bundle some files and compile the rest alone |
@Zorgatone I'm using browserify with the tsify plugin to bundle my files. Then I've started using ES6 imports to pull in all the files that I need for that bundle. |
+1 it would be great if tsconfig.json supported multiple subprojects, and I like the syntax / semantics that @JeroMiya is proposing |
I totally think that this suggestion needs more attention though. |
Duplicate of #3469? |
Extension to #1692.
Motivation:
A common file layout for some projects is to organize code by feature, rather by the kind of the file. This means that the implementation of a feature, along with its unit tests and end to end tests are all grouped into a single directory structure. I use this convention in my own projects.
Currently, however, tsconfig.json assumes that sub-projects are split by directories. With the feature grouped files convention, however, we have multiple 'projects' interleaved in the same directories. For example, end to end tests have different project settings than unit tests, which may have different project settings from the application code itself.
Proposal:
Support sub-projects within a single tsconfig.json. This allows for more flexibility in how files are laid out in an application.
Example:
Building with tsc:
Notes:
The default context is determined as follows:
The text was updated successfully, but these errors were encountered: