moved DebugLogView to components folder

pull/2242/head
Audric Ackermann 4 years ago
parent 3cfcf128a5
commit 335e452730
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -17,7 +17,7 @@
"util-worker": { "util-worker": {
"source": "ts/webworker/workers/util.worker.ts", "source": "ts/webworker/workers/util.worker.ts",
"distDir": "./ts/webworker/workers/", "distDir": "./ts/webworker/workers/",
"optimize" : false, "optimize" : true,
"sourceMap": false, "sourceMap": false,
"context": "web-worker" "context": "web-worker"
} }

@ -1,18 +1,6 @@
// /* global $: false */
// /* global Whisper: false */
import React from 'react'; import React from 'react';
import { DebugLogView } from '../views/DebugLogView'; import { DebugLogView } from '../components/DebugLogView';
// $(document).on('keyup', e => {
// 'use strict';
// if (e.keyCode === 27) {
// window.closeDebugLog();
// }
// });
// Whisper ?
global.setTimeout(() => { global.setTimeout(() => {
window.ReactDOM.render(<DebugLogView />, document.getElementById('root')); window.ReactDOM.render(<DebugLogView />, document.getElementById('root'));
}, 1000); }, 1000);

@ -66,13 +66,15 @@ export function stubWindow<K extends keyof Window>(fn: K, value: WindowValue<K>)
}; };
} }
const enableLogRedirect = false;
export const stubWindowLog = () => { export const stubWindowLog = () => {
stubWindow('log', { stubWindow('log', {
// tslint:disable: no-void-expression // tslint:disable: no-void-expression
// tslint:disable: no-console // tslint:disable: no-console
info: (args: any) => console.info(args), info: (args: any) => (enableLogRedirect ? console.info(args) : {}),
warn: (args: any) => console.warn(args), warn: (args: any) => (enableLogRedirect ? console.warn(args) : {}),
error: (args: any) => console.error(args), error: (args: any) => (enableLogRedirect ? console.error(args) : {}),
debug: (args: any) => console.debug(args), debug: (args: any) => (enableLogRedirect ? console.debug(args) : {}),
}); });
}; };

Loading…
Cancel
Save