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
Copy file name to clipboardExpand all lines: README.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ npx update-ts-references --help
15
15
Usage: update-ts-references [options]
16
16
17
17
Options:
18
-
--configName The name of the config files which needs to be updated. Default: tsconfig.json
18
+
--configName The name of the config files which needs to be updated. Default: tsconfig.json
19
19
--rootConfigName The name of the root config file which needs to be updated. Default: tsconfig.json
20
20
--withoutRootConfig If you will not have a tsconfig in the root directory or don't want to update it. Default: false
21
21
--check Checks if updates would be necessary (without applying them)
@@ -70,7 +70,7 @@ The output for the created file looks like the following
70
70
```
71
71
72
72
## using --createPathMappings
73
-
will create path mappings under `compilerOptions` for a better IDE support. It assumes the source files are under `src`.
73
+
will create path mappings under `compilerOptions` for a better IDE support. The generated mappings respect the `rootDir` defined in the referenced `tsconfig.json` or `jsconfig.json` and only fall back to `src` when no `rootDir` is provided.
74
74
75
75
```json
76
76
{
@@ -106,6 +106,14 @@ Example configuration see [here](./test-scenarios/ts-options-yaml/update-ts-refe
106
106
### using multiple configurations for different usecases
107
107
Executing update-ts-references with different configurations via the parameter `--usecase`.
108
108
109
+
## about jsconfig.json support
110
+
When a dependency does not ship a `tsconfig.json` but provides a `jsconfig.json`, the reference automatically targets that file and the path mappings pick up its `rootDir` as well, if `--createPathMappings` is enabled. `jsconfig.json` files participate in package-level `references`, but they stay out of the root `tsconfig.json`.
111
+
112
+
### in combination with the --configName argument
113
+
Currently the name of the config file derives from the the configName which is `tsconfig.json` and would look for `jsconfig.json`.
114
+
115
+
Example: ` --configName tsconfig.test.json` would look for `jsconfig.test.json`
0 commit comments