File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1+ import { getFolderwrapping , isWindows } from './helpers/Path' ;
2+
13/**
24 * core.log.Log
35 * ------------------------------------------------
@@ -30,10 +32,11 @@ export class Logger {
3032 private static Adapters : Map < string , interfaces . LoggerAdapterConstructor > = new Map ( ) ;
3133
3234 private static parsePathToScope ( path : string ) : string {
33- if ( path . indexOf ( '/' ) >= 0 ) {
35+ const pathDelimiter = isWindows ( ) ? '\\' : '/' ;
36+ if ( path . indexOf ( pathDelimiter ) >= 0 ) {
3437 path = path . replace ( process . cwd ( ) , '' ) ;
35- path = path . replace ( '/ src/' , '' ) ;
36- path = path . replace ( '/ dist/' , '' ) ;
38+ path = path . replace ( getFolderwrapping ( ' src' ) , '' ) ;
39+ path = path . replace ( getFolderwrapping ( ' dist' ) , '' ) ;
3740 path = path . replace ( '.ts' , '' ) ;
3841 path = path . replace ( '.js' , '' ) ;
3942 path = path . replace ( / \/ / g, ':' ) ;
You can’t perform that action at this time.
0 commit comments