Mutliple projects/profiles for the same sources

I have a problem that I don't know how to solve.

I have a TypeScript project that needs to be compiled in 2 (or more) different ways.

Each class is in its own .ts file. I have WebStorm set up for the project to compile main file only and output to /build. The main fire references the other classes, everything is fine.

Let's say this project consists of Typescript classes A, B and C.
Now, suppose I extend the project with a D class. The project could be compiled with classes A, B, C or with A, B, C and D.

For the second case, I'd need a different compilation setting (the output file would be different) but the files would have to be in the same place.

How could I do that?

1 comment
Comment actions Permalink

there is currently no way to define different TypeScript compiler options for different scopes when using built-in compiler :( Please vote for https://youtrack.jetbrains.com/issue/WEB-15538.
For now the only workaround is using file watchers instead  of built-in compiler service - you can define several file watchers, one  for each of your scopes, and provide different options.

0

Please sign in to leave a comment.