You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a source structure in which there is a single top-level directory, and I expect the same structure to be produced in the outDir, instead it is dropped. It seems that tsc trims singleton parent directories.
That behavior is okay, but I would like to be able to explicitly say what the baseDir is, and have the output structure match the input, relative to the baseDir.
Here is a session which demonstrates the problem:
alexeagle-macbookpro2:tmp alexeagle$ mkdir -p dir1/dir2/dir3
alexeagle-macbookpro2:tmp alexeagle$ cat > dir1/dir2/dir3/test3.ts
console.log("dir3");
alexeagle-macbookpro2:tmp alexeagle$ mkdir out
alexeagle-macbookpro2:tmp alexeagle$ tsc --outDir out dir1/dir2/dir3/test3.ts
alexeagle-macbookpro2:tmp alexeagle$ ls out/
test3.js
alexeagle-macbookpro2:tmp alexeagle$ cat > dir1/dir2/test2.ts
console.log('dir2');
alexeagle-macbookpro2:tmp alexeagle$ tsc --outDir out dir1/dir2/dir3/test3.ts dir1/dir2/test2.ts
alexeagle-macbookpro2:tmp alexeagle$ ls out
dir3 test2.js
It's kind of surprising that by adding a file in dir2, the test3.js file has disappeared from the outDir.
The text was updated successfully, but these errors were encountered:
This is something we need to add. The current behaviour is that the basePath/CommonSourceRoot/ProjectRoot is computed as the longest common directory of all source files. and that is what is used to replicate the input structure under the output directory..
I have a source structure in which there is a single top-level directory, and I expect the same structure to be produced in the outDir, instead it is dropped. It seems that tsc trims singleton parent directories.
That behavior is okay, but I would like to be able to explicitly say what the baseDir is, and have the output structure match the input, relative to the baseDir.
Here is a session which demonstrates the problem:
It's kind of surprising that by adding a file in dir2, the test3.js file has disappeared from the outDir.
The text was updated successfully, but these errors were encountered: