| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Conflicts: tests/baselines/reference/APISample_compile.types tests/baselines/reference/APISample_linter.types tests/baselines/reference/APISample_transform.types tests/baselines/reference/APISample_watcher.types
There was a problem hiding this comment.
Use lowercase 'r' for 'RootDir', use single quotes :
"under 'rootDir' '{1}'. 'rootDir' is expected..."
Sorry, something went wrong.
Conflicts: tests/baselines/reference/APISample_compile.types tests/baselines/reference/APISample_linter.types tests/baselines/reference/APISample_transform.types tests/baselines/reference/APISample_watcher.types
There was a problem hiding this comment.
soruceFiles -> sourceFiles
Sorry, something went wrong.
There was a problem hiding this comment.
why so soruce?
Sorry, something went wrong.
|
👍 |
Sorry, something went wrong.
Add new compiler option --rootDir
|
Is this in beta already or will be only in release? |
Sorry, something went wrong.
|
Should be in 1.5-beta |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The new option fixes #2644, which is a reactivation of #287, and has been in discussion in #2034.
Background
The current behavior of the compiler when using --outDir is to duplicate the input structure in the output under the value of --outDir. the root of the input is computed as the longest common path of all source (.ts and not .d.ts) files. so an input of FolderA\FolderB\1.ts and FolderA\FolderB\2.ts would result in computing the commonSourceRoot to FolderA\FolderB\. now if a new file FolderA\3.ts is added to the input, the commonSourceRoot will pop out to FolderA\.
This is generally undesirable and can be confusing. it also does not allow for folders that do not contain .ts files to be replicated in the output.
--rootDir flag
The new flag is used to customize the commonSourceRoot instead of automatically calculating it.
The same rules apply, i.e. all source files (.ts) should be under the rootDir, otherwise the output generation may not be correct.
The name rootDir is meant to resemble outDir as both flags go together.