-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(misc): do not generate tsconfig.base.json for simple standalone … (
- Loading branch information
Showing
25 changed files
with
263 additions
and
386 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
# 4 space indentation | ||
[*.{js,ts,jsx,tsx}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[package.json] | ||
indent_style = space | ||
indent_size = 2 |
10 changes: 0 additions & 10 deletions
10
packages/angular/src/generators/application/angular-v14/files/tsconfig.json
This file was deleted.
Oops, something went wrong.
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: 0 additions & 10 deletions
10
packages/angular/src/generators/application/files/tsconfig.json
This file was deleted.
Oops, something went wrong.
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
14 changes: 0 additions & 14 deletions
14
packages/angular/src/generators/library/files/lib/tsconfig.json__tpl__
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { Tree } from 'nx/src/generators/tree'; | ||
import { tsConfigBaseOptions } from '@nrwl/workspace/src/utils/create-ts-config'; | ||
import { writeJson } from 'nx/src/generators/utils/json'; | ||
export { extractTsConfigBase } from '@nrwl/workspace/src/utils/create-ts-config'; | ||
|
||
export function createTsConfig( | ||
host: Tree, | ||
projectRoot: string, | ||
type: 'app' | 'lib', | ||
options: { | ||
strict?: boolean; | ||
style?: string; | ||
bundler?: string; | ||
rootProject?: boolean; | ||
}, | ||
relativePathToRootTsConfig: string | ||
) { | ||
const json = { | ||
compilerOptions: { | ||
target: 'es2022', | ||
useDefineForClassFields: false, | ||
}, | ||
files: [], | ||
include: [], | ||
references: [ | ||
{ | ||
path: type === 'app' ? './tsconfig.app.json' : './tsconfig.lib.json', | ||
}, | ||
], | ||
} as any; | ||
|
||
// inline tsconfig.base.json into the project | ||
if (options.rootProject) { | ||
json.compileOnSave = false; | ||
json.compilerOptions = { ...tsConfigBaseOptions, ...json.compilerOptions }; | ||
json.exclude = ['node_modules', 'tmp']; | ||
} else { | ||
json.extends = relativePathToRootTsConfig; | ||
} | ||
|
||
writeJson(host, `${projectRoot}/tsconfig.json`, json); | ||
} |
Oops, something went wrong.
91c19f5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
nx-dev – ./
nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app
nx.dev
nx-five.vercel.app