I have a scenario where I have two different tsconfig.json
files - one in the root directory and another in the test
folder:
.
├── dist
│ └── file...
├── dist-test
│ └── file...
├── src
│ └── file...
├── test
│ ├── file...
│ └── tsconfig.json
└── tsconfig.json
In this setup, files from the src
folder compile into the dist
directory, while files from the test
folder compile into the dist-test
directory.
When working from the root directory, I can use either tsc -w
or tsc -w --project test
to watch for changes in the files. Is there a way to run both commands simultaneously within the same terminal?
I attempted to execute
(tsc -w) && (tsc -w --project test)
, but it did not work as expected. Only the first command is executed, and it only compiles the dist
directory.
UPD: This question differs from How can I run multiple npm scripts in parallel?
because I am specifically dealing with the tsc
utility, which, I believe, should be able to handle compiling two projects at once without requiring parallel processing with different programs.