File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed
src/material/schematics/ng-add Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -33,13 +33,21 @@ const noopAnimationsModuleName = 'NoopAnimationsModule';
33
33
* - Adds Browser Animation to app.module
34
34
*/
35
35
export default function ( options : Schema ) : Rule {
36
- return chain ( [
37
- addAnimationsModule ( options ) ,
38
- addThemeToAppStyles ( options ) ,
39
- addFontsToIndex ( options ) ,
40
- addMaterialAppStyles ( options ) ,
41
- addTypographyClass ( options ) ,
42
- ] ) ;
36
+ return ( host : Tree ) => {
37
+ const workspace = getWorkspace ( host ) ;
38
+ const project = getProjectFromWorkspace ( workspace , options . project ) ;
39
+
40
+ if ( project . projectType === 'application' ) {
41
+ return chain ( [
42
+ addAnimationsModule ( options ) ,
43
+ addThemeToAppStyles ( options ) ,
44
+ addFontsToIndex ( options ) ,
45
+ addMaterialAppStyles ( options ) ,
46
+ addTypographyClass ( options ) ,
47
+ ] ) ;
48
+ }
49
+ return host ;
50
+ } ;
43
51
}
44
52
45
53
/**
You can’t perform that action at this time.
0 commit comments