Commit ab2ac16 1 parent 76b6b44 commit ab2ac16 Copy full SHA for ab2ac16
File tree 3 files changed +37
-7
lines changed
3 files changed +37
-7
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,3 @@ This folder contains code shared between the `main` and `renderer` processes.
6
6
7
7
Common code cannot use any Node APIs like ` fs ` , ` path ` , or ` process ` because
8
8
node integration is not enabled in the ` renderer ` process per security best practices.
9
-
10
- # Bundling
11
-
12
- This folder does not contain its own ` tsconfig.json ` because it is not compiled independently.
13
- It is bundled with the ` main ` and ` renderer ` processes separately and tree shaking removes
14
- from each's bundle the code that is not used.
Original file line number Diff line number Diff line change 1
1
import electronLog , { LogMessage } from 'electron-log' ;
2
2
import { camelCase , get } from 'lodash' ;
3
- import { LogData , LogFunction } from './logger.types' ;
3
+ import { LogData , LogFunction , Logger } from './logger.types' ;
4
+
5
+ export function createLogger ( scope ?: string ) : Logger {
6
+ return scope ? electronLog . scope ( scope ) : electronLog ;
7
+ }
4
8
5
9
export function initializeLogging ( logger : electronLog . Logger ) : void {
6
10
// Add our custom log formatter.
Original file line number Diff line number Diff line change
1
+ {
2
+ "compilerOptions" : {
3
+ "target" : "ESNext" ,
4
+ "module" : "CommonJS" ,
5
+ "moduleResolution" : "Node" ,
6
+ "incremental" : true ,
7
+ "baseUrl" : "." ,
8
+ "outDir" : "../build/common" ,
9
+ "declaration" : false ,
10
+ "sourceMap" : true ,
11
+ "inlineSources" : true ,
12
+ // Set `sourceRoot` to "/" to strip the build path prefix
13
+ // from generated source code references.
14
+ // This improves issue grouping in Sentry.
15
+ "sourceRoot" : "/" ,
16
+ "allowJs" : true ,
17
+ "strict" : true ,
18
+ "alwaysStrict" : true ,
19
+ "esModuleInterop" : true ,
20
+ "resolveJsonModule" : true ,
21
+ "forceConsistentCasingInFileNames" : true ,
22
+ "allowSyntheticDefaultImports" : true ,
23
+ "emitDecoratorMetadata" : true ,
24
+ "experimentalDecorators" : true ,
25
+ "skipLibCheck" : true ,
26
+ "isolatedModules" : true ,
27
+ "jsx" : "preserve" ,
28
+ "lib" : [ "DOM" , "DOM.Iterable" , "ESNext" ]
29
+ } ,
30
+ "exclude" : [ "node_modules" ] ,
31
+ "include" : [ "**/*.ts" ]
32
+ }
You can’t perform that action at this time.
0 commit comments