Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(misc): support workspaces using a root tsconfig.json instead of t…
…sconfig.base.json
- Loading branch information
1 parent
1390cd0
commit f6e2fec
Showing
80 changed files
with
866 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/angular/src/generators/application/files/tsconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/angular/src/generators/library-secondary-entry-point/lib/add-path-mapping.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/angular/src/generators/library/files/lib/tsconfig.json__tpl__
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 3 additions & 7 deletions
10
packages/angular/src/generators/web-worker/lib/update-tsconfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,17 @@ | ||
import type { Tree } from '@nrwl/devkit'; | ||
import { | ||
getWorkspaceLayout, | ||
joinPathFragments, | ||
offsetFromRoot, | ||
readProjectConfiguration, | ||
updateJson, | ||
} from '@nrwl/devkit'; | ||
import { getRootTsConfigPathInTree } from '@nrwl/workspace/src/utilities/typescript'; | ||
|
||
export function updateTsConfig(tree: Tree, project: string): void { | ||
const workerTsConfigPath = joinPathFragments( | ||
getWorkspaceLayout(tree).appsDir, | ||
project, | ||
'tsconfig.worker.json' | ||
); | ||
const { root } = readProjectConfiguration(tree, project); | ||
const workerTsConfigPath = joinPathFragments(root, 'tsconfig.worker.json'); | ||
updateJson(tree, workerTsConfigPath, (json) => { | ||
json.extends = `${offsetFromRoot(root)}tsconfig.base.json`; | ||
json.extends = offsetFromRoot(root) + getRootTsConfigPathInTree(tree); | ||
return json; | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.