-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(@ngtools/webpack): support custom logging
- Loading branch information
1 parent
b89f6b1
commit 5852f39
Showing
4 changed files
with
99 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { logging } from '@angular-devkit/core'; | ||
import * as ts from 'typescript'; | ||
|
||
|
||
export enum MESSAGE_KIND { | ||
Init, | ||
Update, | ||
Log, | ||
} | ||
|
||
export abstract class TypeCheckerMessage { | ||
constructor(public kind: MESSAGE_KIND) { } | ||
} | ||
|
||
export class InitMessage extends TypeCheckerMessage { | ||
constructor( | ||
public compilerOptions: ts.CompilerOptions, | ||
public basePath: string, | ||
public jitMode: boolean, | ||
public rootNames: string[], | ||
public hostReplacementPaths: { [path: string]: string }, | ||
) { | ||
super(MESSAGE_KIND.Init); | ||
} | ||
} | ||
|
||
export class UpdateMessage extends TypeCheckerMessage { | ||
constructor(public rootNames: string[], public changedCompilationFiles: string[]) { | ||
super(MESSAGE_KIND.Update); | ||
} | ||
} | ||
|
||
export class LogMessage extends TypeCheckerMessage { | ||
constructor(public level: logging.LogLevel, public message: string) { | ||
super(MESSAGE_KIND.Log); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters