File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
packages/angular_devkit/build_ng_packagr/src/build Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ function requireProjectModule(root: string, moduleName: string) {
27
27
28
28
export interface NgPackagrBuilderOptions {
29
29
project : string ;
30
+ tsConfig ?: string ;
30
31
}
31
32
32
33
export class NgPackagrBuilder implements Builder < NgPackagrBuilderOptions > {
@@ -46,9 +47,15 @@ export class NgPackagrBuilder implements Builder<NgPackagrBuilderOptions> {
46
47
getSystemPath ( root ) , 'ng-packagr' ) as typeof ngPackagr ;
47
48
const packageJsonPath = getSystemPath ( resolve ( root , normalize ( options . project ) ) ) ;
48
49
49
- projectNgPackagr . ngPackagr ( )
50
- . forProject ( packageJsonPath )
51
- . build ( )
50
+ const ngPkgProject = projectNgPackagr . ngPackagr ( )
51
+ . forProject ( packageJsonPath ) ;
52
+
53
+ if ( options . tsConfig ) {
54
+ const tsConfigPath = getSystemPath ( resolve ( root , normalize ( options . tsConfig ) ) ) ;
55
+ ngPkgProject . withTsConfig ( tsConfigPath ) ;
56
+ }
57
+
58
+ ngPkgProject . build ( )
52
59
. then ( ( ) => {
53
60
obs . next ( { success : true } ) ;
54
61
obs . complete ( ) ;
Original file line number Diff line number Diff line change 6
6
"project" : {
7
7
"type" : " string" ,
8
8
"description" : " The file path of the package.json for distribution via npm."
9
+ },
10
+ "tsConfig" : {
11
+ "type" : " string" ,
12
+ "description" : " The file path of the TypeScript configuration file."
9
13
}
10
14
},
11
15
"additionalProperties" : false ,
You can’t perform that action at this time.
0 commit comments