feat(js): add srcRootForCompilationRoot option to tsc executor (#10707)
* feat(js): add `srcRootForCompilationRoot` option to tsc executor ISSUES CLOSED: #9410 * docs(js): add description for `srcRootForCompilationRoot` option
This commit is contained in:
parent
d782a694f4
commit
aa01b7bd2d
@ -305,6 +305,10 @@
|
||||
"description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.",
|
||||
"enum": ["dependencies", "peerDependencies"],
|
||||
"default": "peerDependencies"
|
||||
},
|
||||
"srcRootForCompilationRoot": {
|
||||
"type": "string",
|
||||
"description": "Sets the rootDir for TypeScript compilation. When not defined, it uses the project's root property"
|
||||
}
|
||||
},
|
||||
"required": ["main", "outputPath", "tsConfig"],
|
||||
|
||||
@ -57,6 +57,10 @@
|
||||
"description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.",
|
||||
"enum": ["dependencies", "peerDependencies"],
|
||||
"default": "peerDependencies"
|
||||
},
|
||||
"srcRootForCompilationRoot": {
|
||||
"type": "string",
|
||||
"description": "Sets the rootDir for TypeScript compilation. When not defined, it uses the project's root property"
|
||||
}
|
||||
},
|
||||
"required": ["main", "outputPath", "tsConfig"],
|
||||
|
||||
1
packages/js/src/utils/schema.d.ts
vendored
1
packages/js/src/utils/schema.d.ts
vendored
@ -42,6 +42,7 @@ export interface ExecutorOptions {
|
||||
transformers: TransformerEntry[];
|
||||
updateBuildableProjectDepsInPackageJson?: boolean;
|
||||
buildableProjectDepsInPackageJsonType?: 'dependencies' | 'peerDependencies';
|
||||
srcRootForCompilationRoot?: string;
|
||||
}
|
||||
|
||||
export interface NormalizedExecutorOptions extends ExecutorOptions {
|
||||
|
||||
@ -54,6 +54,7 @@ export async function* compileTypeScriptFiles(
|
||||
outputPath: normalizedOptions.outputPath,
|
||||
projectName: context.projectName,
|
||||
projectRoot: normalizedOptions.projectRoot,
|
||||
rootDir: normalizedOptions.srcRootForCompilationRoot,
|
||||
tsConfig: normalizedOptions.tsConfig,
|
||||
watch: normalizedOptions.watch,
|
||||
deleteOutputPath: normalizedOptions.clean,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user