@@ -7,9 +7,9 @@ export type Builder = 'esbuild' | 'webpack' | 'gradle' | 'maven' | 'poetry';
7
7
// export type TypeChecker = 'mypy' | 'pyright';
8
8
// export type TestingTool = 'pytest' | null;
9
9
// export type Formatter = 'Black' | 'Prettier';
10
- export type ContainerType = 'Docker ' | 'Singularity ' ;
10
+ export type ContainerType = 'docker ' | 'singularity ' ;
11
11
// export type Language = 'python' | 'typescript' | 'javascript';
12
- // export type Framework = 'Flask' | 'React' | 'Angular' | 'Vue' | null ;
12
+ export type Framework = 'angular' ;
13
13
14
14
export type ProjectMetadata = {
15
15
projectType : ProjectType ;
@@ -24,7 +24,7 @@ export type ProjectMetadata = {
24
24
// formatter: Formatter;
25
25
containerType : ContainerType | null ;
26
26
// language: Language;
27
- // framework: Framework;
27
+ framework : Framework | null ;
28
28
} ;
29
29
30
30
export function inferProjectMetadata (
@@ -37,6 +37,7 @@ export function inferProjectMetadata(
37
37
projectType : inferProjectType ( projectRoot ) ,
38
38
builder : inferBuilder ( siblingFiles , localProjectConfiguration ) ,
39
39
containerType : inferContainerType ( siblingFiles ) ,
40
+ framework : inferFramework ( localProjectConfiguration ) ,
40
41
} ;
41
42
}
42
43
@@ -68,7 +69,18 @@ function inferBuilder(
68
69
}
69
70
70
71
function inferContainerType ( siblingFiles : string [ ] ) : ContainerType | null {
71
- if ( siblingFiles . includes ( 'Dockerfile' ) ) return 'Docker' ;
72
+ if ( siblingFiles . includes ( 'Dockerfile' ) ) return 'docker' ;
73
+
74
+ return null ;
75
+ }
76
+
77
+ function inferFramework ( localProjectConfiguration : ProjectConfiguration ) : Framework | null {
78
+ const buildExecutor = localProjectConfiguration ?. targets ?. [ 'build' ] ?. executor ?? '' ;
79
+ const angularBuildExecutors = [ '@angular-devkit/build-angular:browser' ] ;
80
+
81
+ if ( angularBuildExecutors . includes ( buildExecutor ) ) {
82
+ return 'angular' ;
83
+ }
72
84
73
85
return null ;
74
86
}
0 commit comments