Skip to content
Snippets Groups Projects
Commit dda43370 authored by Alexander Rose's avatar Alexander Rose
Browse files

add setProductionMode, setDebugMode exports

parent 92c1e979
No related branches found
No related tags found
No related merge requests found
...@@ -23,9 +23,11 @@ import { ObjectKeys } from '../../mol-util/type-helpers'; ...@@ -23,9 +23,11 @@ import { ObjectKeys } from '../../mol-util/type-helpers';
import { PluginState } from '../../mol-plugin/state'; import { PluginState } from '../../mol-plugin/state';
import { DownloadDensity } from '../../mol-plugin-state/actions/volume'; import { DownloadDensity } from '../../mol-plugin-state/actions/volume';
import { PluginLayoutControlsDisplay } from '../../mol-plugin/layout'; import { PluginLayoutControlsDisplay } from '../../mol-plugin/layout';
require('mol-plugin-ui/skin/light.scss'); require('mol-plugin-ui/skin/light.scss');
export { PLUGIN_VERSION as version } from '../../mol-plugin/version'; export { PLUGIN_VERSION as version } from '../../mol-plugin/version';
export { setProductionMode, setDebugMode } from '../../mol-util/debug';
const Extensions = { const Extensions = {
'cellpack': PluginSpec.Behavior(CellPack), 'cellpack': PluginSpec.Behavior(CellPack),
......
/** /**
* Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info. * Copyright (c) 2019-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
* *
* @author Alexander Rose <alexander.rose@weirdbyte.de> * @author Alexander Rose <alexander.rose@weirdbyte.de>
*/ */
...@@ -16,13 +16,12 @@ let isProductionMode = process.env.NODE_ENV === 'production'; ...@@ -16,13 +16,12 @@ let isProductionMode = process.env.NODE_ENV === 'production';
*/ */
let isDebugMode = process.env.DEBUG === '*' || process.env.DEBUG === 'molstar'; let isDebugMode = process.env.DEBUG === '*' || process.env.DEBUG === 'molstar';
if (typeof window !== 'undefined' && !(window as any).setMolStarDebugMode) { export { isProductionMode, isDebugMode };
try {
(window as any).setMolStarDebugMode = function setMolStarDebugMode(isDebug?: boolean, isProduction?: boolean) { export function setProductionMode(value?: boolean) {
if (typeof isDebug !== 'undefined') isDebugMode = isDebug; if (typeof value !== 'undefined') isProductionMode = value;
if (typeof isProduction !== 'undefined') isProductionMode = isProduction;
};
} catch { }
} }
export { isProductionMode, isDebugMode }; export function setDebugMode(value?: boolean) {
\ No newline at end of file if (typeof value !== 'undefined') isDebugMode = value;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment