Commit 28e4114 1 parent ba5be21 commit 28e4114 Copy full SHA for 28e4114
File tree 9 files changed +27
-8
lines changed
9 files changed +27
-8
lines changed Original file line number Diff line number Diff line change 23
23
- * testTsconfig* (` string ` ): The name of the TypeScript configuration file for unit tests.
24
24
- * prefix* (` string ` ): The prefix to apply to generated selectors.
25
25
- * serviceWorker* (` boolean ` ): Experimental support for a service worker from @angular/service-worker . Default is ` false ` .
26
- - * hideCircularDependencyWarnings * (` boolean ` ): Hide circular dependency warnings on builds. Default is ` false ` .
26
+ - * showCircularDependencies * (` boolean ` ): Show circular dependency warnings on builds. Default is ` true ` .
27
27
- * styles* (` string|array ` ): Global styles to be included in the build.
28
28
- * stylePreprocessorOptions* : Options to pass to style preprocessors.
29
29
- * includePaths* (` array ` ): Paths to include. Paths will be resolved to project root.
Original file line number Diff line number Diff line change @@ -312,3 +312,13 @@ Note: service worker support is experimental and subject to change.
312
312
Run build when files change.
313
313
</p >
314
314
</details >
315
+
316
+ <details >
317
+ <summary >show-circular-dependencies</summary >
318
+ <p >
319
+ <code>--show-circular-dependencies</code> (aliases: <code>-scd</code>)
320
+ </p >
321
+ <p >
322
+ Show circular dependency warnings on builds.
323
+ </p >
324
+ </details >
Original file line number Diff line number Diff line change @@ -138,6 +138,12 @@ export const baseBuildCommandOptions: any = [
138
138
type : Boolean ,
139
139
default : true ,
140
140
description : 'Extract all licenses in a separate file, in the case of production builds only.'
141
+ } ,
142
+ {
143
+ name : 'show-circular-dependencies' ,
144
+ type : Boolean ,
145
+ aliases : [ 'scd' ] ,
146
+ description : 'Show circular dependency warnings on builds.'
141
147
}
142
148
] ;
143
149
Original file line number Diff line number Diff line change 118
118
"type" : " boolean" ,
119
119
"default" : false
120
120
},
121
- "hideCircularDependencyWarnings " : {
122
- "description" : " Hide circular dependency warnings on builds." ,
121
+ "showCircularDependencies " : {
122
+ "description" : " Show circular dependency warnings on builds." ,
123
123
"type" : " boolean" ,
124
- "default" : false
124
+ "default" : true
125
125
},
126
126
"styles" : {
127
127
"description" : " Global styles to be included in the build." ,
Original file line number Diff line number Diff line change @@ -20,4 +20,5 @@ export interface BuildOptions {
20
20
deleteOutputPath ?: boolean ;
21
21
preserveSymlinks ?: boolean ;
22
22
extractLicenses ?: boolean ;
23
+ showCircularDependencies ?: boolean ;
23
24
}
Original file line number Diff line number Diff line change @@ -98,7 +98,8 @@ export class NgCliWebpackConfig {
98
98
const mergeableOptions = {
99
99
outputPath : appConfig . outDir ,
100
100
deployUrl : appConfig . deployUrl ,
101
- baseHref : appConfig . baseHref
101
+ baseHref : appConfig . baseHref ,
102
+ showCircularDependencies : appConfig . showCircularDependencies
102
103
} ;
103
104
104
105
return Object . assign ( { } , mergeableOptions , buildOptions ) ;
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
73
73
} ) ) ;
74
74
}
75
75
76
- if ( ! appConfig . hideCircularDependencyWarnings ) {
76
+ if ( buildOptions . showCircularDependencies ) {
77
77
extraPlugins . push ( new CircularDependencyPlugin ( {
78
78
exclude : / ( \\ | \/ ) n o d e _ m o d u l e s ( \\ | \/ ) /
79
79
} ) ) ;
Original file line number Diff line number Diff line change @@ -513,6 +513,7 @@ export default Task.extend({
513
513
'style-loader' ,
514
514
'stylus-loader' ,
515
515
'url-loader' ,
516
+ 'circular-dependency-plugin' ,
516
517
] . forEach ( ( packageName : string ) => {
517
518
packageJson [ 'devDependencies' ] [ packageName ] = ourPackageJson [ 'dependencies' ] [ packageName ] ;
518
519
} ) ;
Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ import { ng } from '../../utils/process';
5
5
export default async function ( ) {
6
6
await prependToFile ( 'src/app/app.component.ts' ,
7
7
`import { AppModule } from './app.module'; console.log(AppModule);` ) ;
8
- let output = await ng ( 'build' ) ;
8
+ let output = await ng ( 'build' , '--show-circular-dependencies' ) ;
9
9
if ( ! output . stdout . match ( / W A R N I N G i n C i r c u l a r d e p e n d e n c y d e t e c t e d / ) ) {
10
10
throw new Error ( 'Expected to have circular dependency warning in output.' ) ;
11
11
}
12
12
13
- await ng ( 'set' , 'apps.0.hideCircularDependencyWarnings=true ' ) ;
13
+ await ng ( 'set' , 'apps.0.showCircularDependencies=false ' ) ;
14
14
output = await ng ( 'build' ) ;
15
15
if ( output . stdout . match ( / W A R N I N G i n C i r c u l a r d e p e n d e n c y d e t e c t e d / ) ) {
16
16
throw new Error ( 'Expected to not have circular dependency warning in output.' ) ;
You can’t perform that action at this time.
0 commit comments