File tree 9 files changed +29
-10
lines changed
packages/angular_devkit/build_angular/src
9 files changed +29
-10
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ import {
34
34
statsToString ,
35
35
statsWarningsToString ,
36
36
} from '../angular-cli-files/utilities/stats' ;
37
- import { normalizeAssetPatterns , normalizeFileReplacements } from '../utils' ;
37
+ import { defaultProgress , normalizeAssetPatterns , normalizeFileReplacements } from '../utils' ;
38
38
import { AssetPatternObject , BrowserBuilderSchema , CurrentFileReplacement } from './schema' ;
39
39
const webpackMerge = require ( 'webpack-merge' ) ;
40
40
@@ -138,6 +138,8 @@ export class BrowserBuilder implements Builder<BrowserBuilderSchema> {
138
138
supportES2015,
139
139
} ;
140
140
141
+ wco . buildOptions . progress = defaultProgress ( wco . buildOptions . progress ) ;
142
+
141
143
const webpackConfigs : { } [ ] = [
142
144
getCommonConfig ( wco ) ,
143
145
getBrowserConfig ( wco ) ,
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ export interface BrowserBuilderSchema {
104
104
/**
105
105
* Log progress to the console while building.
106
106
*/
107
- progress : boolean ;
107
+ progress ? : boolean ;
108
108
109
109
/**
110
110
* Localization file to use for i18n.
Original file line number Diff line number Diff line change 115
115
},
116
116
"progress" : {
117
117
"type" : " boolean" ,
118
- "description" : " Log progress to the console while building." ,
119
- "default" : true
118
+ "description" : " Log progress to the console while building."
120
119
},
121
120
"i18nFile" : {
122
121
"type" : " string" ,
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ import {
27
27
import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig' ;
28
28
import { requireProjectModule } from '../angular-cli-files/utilities/require-project-module' ;
29
29
import { AssetPatternObject , CurrentFileReplacement } from '../browser/schema' ;
30
- import { normalizeAssetPatterns , normalizeFileReplacements } from '../utils' ;
30
+ import { defaultProgress , normalizeAssetPatterns , normalizeFileReplacements } from '../utils' ;
31
31
import { KarmaBuilderSchema } from './schema' ;
32
32
const webpackMerge = require ( 'webpack-merge' ) ;
33
33
@@ -137,6 +137,8 @@ export class KarmaBuilder implements Builder<KarmaBuilderSchema> {
137
137
supportES2015,
138
138
} ;
139
139
140
+ wco . buildOptions . progress = defaultProgress ( wco . buildOptions . progress ) ;
141
+
140
142
const webpackConfigs : { } [ ] = [
141
143
getCommonConfig ( wco ) ,
142
144
getStylesConfig ( wco ) ,
Original file line number Diff line number Diff line change 77
77
},
78
78
"progress" : {
79
79
"type" : " boolean" ,
80
- "description" : " Log progress to the console while building." ,
81
- "default" : true
80
+ "description" : " Log progress to the console while building."
82
81
},
83
82
"watch" : {
84
83
"type" : " boolean" ,
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ import {
30
30
import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig' ;
31
31
import { requireProjectModule } from '../angular-cli-files/utilities/require-project-module' ;
32
32
import { getBrowserLoggingCb } from '../browser' ;
33
- import { normalizeFileReplacements } from '../utils' ;
33
+ import { defaultProgress , normalizeFileReplacements } from '../utils' ;
34
34
import { BuildWebpackServerSchema } from './schema' ;
35
35
const webpackMerge = require ( 'webpack-merge' ) ;
36
36
@@ -98,6 +98,8 @@ export class ServerBuilder implements Builder<BuildWebpackServerSchema> {
98
98
supportES2015,
99
99
} ;
100
100
101
+ wco . buildOptions . progress = defaultProgress ( wco . buildOptions . progress ) ;
102
+
101
103
const webpackConfigs : { } [ ] = [
102
104
getCommonConfig ( wco ) ,
103
105
getServerConfig ( wco ) ,
Original file line number Diff line number Diff line change 80
80
},
81
81
"progress" : {
82
82
"type" : " boolean" ,
83
- "description" : " Log progress to the console while building." ,
84
- "default" : true
83
+ "description" : " Log progress to the console while building."
85
84
},
86
85
"i18nFile" : {
87
86
"type" : " string" ,
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @license
3
+ * Copyright Google Inc. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+
9
+ export function defaultProgress ( progress : boolean | undefined ) : boolean {
10
+ if ( progress === undefined ) {
11
+ return process . stdout . isTTY === true ;
12
+ }
13
+
14
+ return progress ;
15
+ }
Original file line number Diff line number Diff line change 6
6
* found in the LICENSE file at https://angular.io/license
7
7
*/
8
8
9
+ export * from './default-progress' ;
9
10
export * from './run-module-as-observable-fork' ;
10
11
export * from './normalize-file-replacements' ;
11
12
export * from './normalize-asset-patterns' ;
You can’t perform that action at this time.
0 commit comments