File tree Expand file tree Collapse file tree 9 files changed +29
-10
lines changed
packages/angular_devkit/build_angular/src Expand file tree Collapse file tree 9 files changed +29
-10
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ import {
3434 statsToString ,
3535 statsWarningsToString ,
3636} from '../angular-cli-files/utilities/stats' ;
37- import { normalizeAssetPatterns , normalizeFileReplacements } from '../utils' ;
37+ import { defaultProgress , normalizeAssetPatterns , normalizeFileReplacements } from '../utils' ;
3838import { AssetPatternObject , BrowserBuilderSchema , CurrentFileReplacement } from './schema' ;
3939const webpackMerge = require ( 'webpack-merge' ) ;
4040
@@ -138,6 +138,8 @@ export class BrowserBuilder implements Builder<BrowserBuilderSchema> {
138138 supportES2015,
139139 } ;
140140
141+ wco . buildOptions . progress = defaultProgress ( wco . buildOptions . progress ) ;
142+
141143 const webpackConfigs : { } [ ] = [
142144 getCommonConfig ( wco ) ,
143145 getBrowserConfig ( wco ) ,
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ export interface BrowserBuilderSchema {
104104 /**
105105 * Log progress to the console while building.
106106 */
107- progress : boolean ;
107+ progress ? : boolean ;
108108
109109 /**
110110 * Localization file to use for i18n.
Original file line number Diff line number Diff line change 115115 },
116116 "progress" : {
117117 "type" : " boolean" ,
118- "description" : " Log progress to the console while building." ,
119- "default" : true
118+ "description" : " Log progress to the console while building."
120119 },
121120 "i18nFile" : {
122121 "type" : " string" ,
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ import {
2727import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig' ;
2828import { requireProjectModule } from '../angular-cli-files/utilities/require-project-module' ;
2929import { AssetPatternObject , CurrentFileReplacement } from '../browser/schema' ;
30- import { normalizeAssetPatterns , normalizeFileReplacements } from '../utils' ;
30+ import { defaultProgress , normalizeAssetPatterns , normalizeFileReplacements } from '../utils' ;
3131import { KarmaBuilderSchema } from './schema' ;
3232const webpackMerge = require ( 'webpack-merge' ) ;
3333
@@ -137,6 +137,8 @@ export class KarmaBuilder implements Builder<KarmaBuilderSchema> {
137137 supportES2015,
138138 } ;
139139
140+ wco . buildOptions . progress = defaultProgress ( wco . buildOptions . progress ) ;
141+
140142 const webpackConfigs : { } [ ] = [
141143 getCommonConfig ( wco ) ,
142144 getStylesConfig ( wco ) ,
Original file line number Diff line number Diff line change 7777 },
7878 "progress" : {
7979 "type" : " boolean" ,
80- "description" : " Log progress to the console while building." ,
81- "default" : true
80+ "description" : " Log progress to the console while building."
8281 },
8382 "watch" : {
8483 "type" : " boolean" ,
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ import {
3030import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig' ;
3131import { requireProjectModule } from '../angular-cli-files/utilities/require-project-module' ;
3232import { getBrowserLoggingCb } from '../browser' ;
33- import { normalizeFileReplacements } from '../utils' ;
33+ import { defaultProgress , normalizeFileReplacements } from '../utils' ;
3434import { BuildWebpackServerSchema } from './schema' ;
3535const webpackMerge = require ( 'webpack-merge' ) ;
3636
@@ -98,6 +98,8 @@ export class ServerBuilder implements Builder<BuildWebpackServerSchema> {
9898 supportES2015,
9999 } ;
100100
101+ wco . buildOptions . progress = defaultProgress ( wco . buildOptions . progress ) ;
102+
101103 const webpackConfigs : { } [ ] = [
102104 getCommonConfig ( wco ) ,
103105 getServerConfig ( wco ) ,
Original file line number Diff line number Diff line change 8080 },
8181 "progress" : {
8282 "type" : " boolean" ,
83- "description" : " Log progress to the console while building." ,
84- "default" : true
83+ "description" : " Log progress to the console while building."
8584 },
8685 "i18nFile" : {
8786 "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 66 * found in the LICENSE file at https://angular.io/license
77 */
88
9+ export * from './default-progress' ;
910export * from './run-module-as-observable-fork' ;
1011export * from './normalize-file-replacements' ;
1112export * from './normalize-asset-patterns' ;
You can’t perform that action at this time.
0 commit comments