moved DebugLogView to components folder
This commit is contained in:
parent
3cfcf128a5
commit
335e452730
|
@ -17,7 +17,7 @@
|
|||
"util-worker": {
|
||||
"source": "ts/webworker/workers/util.worker.ts",
|
||||
"distDir": "./ts/webworker/workers/",
|
||||
"optimize" : false,
|
||||
"optimize" : true,
|
||||
"sourceMap": false,
|
||||
"context": "web-worker"
|
||||
}
|
||||
|
|
|
@ -1,18 +1,6 @@
|
|||
// /* global $: false */
|
||||
// /* global Whisper: false */
|
||||
|
||||
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(() => {
|
||||
window.ReactDOM.render(<DebugLogView />, document.getElementById('root'));
|
||||
}, 1000);
|
||||
|
|
|
@ -66,13 +66,15 @@ export function stubWindow<K extends keyof Window>(fn: K, value: WindowValue<K>)
|
|||
};
|
||||
}
|
||||
|
||||
const enableLogRedirect = false;
|
||||
|
||||
export const stubWindowLog = () => {
|
||||
stubWindow('log', {
|
||||
// tslint:disable: no-void-expression
|
||||
// tslint:disable: no-console
|
||||
info: (args: any) => console.info(args),
|
||||
warn: (args: any) => console.warn(args),
|
||||
error: (args: any) => console.error(args),
|
||||
debug: (args: any) => console.debug(args),
|
||||
info: (args: any) => (enableLogRedirect ? console.info(args) : {}),
|
||||
warn: (args: any) => (enableLogRedirect ? console.warn(args) : {}),
|
||||
error: (args: any) => (enableLogRedirect ? console.error(args) : {}),
|
||||
debug: (args: any) => (enableLogRedirect ? console.debug(args) : {}),
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue