File tree Expand file tree Collapse file tree 6 files changed +7
-9
lines changed Expand file tree Collapse file tree 6 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 1
- import BrowserReporter from "./reporters/browser" ;
1
+ import { BrowserReporter } from "./reporters/browser" ;
2
2
import { createConsola as _createConsola } from "./consola" ;
3
3
import type { ConsolaOptions } from "./types" ;
4
4
Original file line number Diff line number Diff line change 1
1
import { isDebug , isTest , isCI } from "std-env" ;
2
2
import { LogLevels , LogLevel } from "./constants" ;
3
3
import type { ConsolaOptions } from "./types" ;
4
- import { BasicReporter , FancyReporter } from "./reporters" ;
4
+ import { BasicReporter } from "./reporters/basic" ;
5
+ import { FancyReporter } from "./reporters/fancy" ;
5
6
import { ConsolaInstance , createConsola as _createConsola } from "./consola" ;
6
7
7
8
export * from "./index.shared" ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import { writeStream } from "../utils/stream";
10
10
11
11
const bracket = ( x : string ) => ( x ? `[${ x } ]` : "" ) ;
12
12
13
- export default class BasicReporter implements ConsolaReporter {
13
+ export class BasicReporter implements ConsolaReporter {
14
14
formatStack ( stack : string , opts : FormatOptions ) {
15
15
return " " + parseStack ( stack ) . join ( "\n " ) ;
16
16
}
Original file line number Diff line number Diff line change 1
1
import { LogObject } from "../types" ;
2
2
3
- export default class BrowserReporter {
3
+ export class BrowserReporter {
4
4
options : any ;
5
5
defaultColor : string ;
6
6
levelColorMap : Record < number , string > ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import * as colors from "colorette";
4
4
import { parseStack } from "../utils/error" ;
5
5
import { FormatOptions , LogObject } from "../types" ;
6
6
import { LogLevel , LogType } from "../constants" ;
7
- import BasicReporter from "./basic" ;
7
+ import { BasicReporter } from "./basic" ;
8
8
9
9
export const TYPE_COLOR_MAP : { [ k in LogType ] ?: string } = {
10
10
info : "cyan" ,
@@ -35,7 +35,7 @@ const TYPE_ICONS: { [k in LogType]?: string } = {
35
35
log : "" ,
36
36
} ;
37
37
38
- export default class FancyReporter extends BasicReporter {
38
+ export class FancyReporter extends BasicReporter {
39
39
formatStack ( stack : string ) {
40
40
return (
41
41
"\n" +
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments