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';
import { PluginState } from '../../mol-plugin/state';
import { DownloadDensity } from '../../mol-plugin-state/actions/volume';
import { PluginLayoutControlsDisplay } from '../../mol-plugin/layout';
require('mol-plugin-ui/skin/light.scss');
export { PLUGIN_VERSION as version } from '../../mol-plugin/version';
export { setProductionMode, setDebugMode } from '../../mol-util/debug';
const Extensions = {
'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>
*/
......@@ -16,13 +16,12 @@ let isProductionMode = process.env.NODE_ENV === 'production';
*/
let isDebugMode = process.env.DEBUG === '*' || process.env.DEBUG === 'molstar';
if (typeof window !== 'undefined' && !(window as any).setMolStarDebugMode) {
try {
(window as any).setMolStarDebugMode = function setMolStarDebugMode(isDebug?: boolean, isProduction?: boolean) {
if (typeof isDebug !== 'undefined') isDebugMode = isDebug;
if (typeof isProduction !== 'undefined') isProductionMode = isProduction;
};
} catch { }
export { isProductionMode, isDebugMode };
export function setProductionMode(value?: boolean) {
if (typeof value !== 'undefined') isProductionMode = value;
}
export { isProductionMode, isDebugMode };
\ No newline at end of file
export function setDebugMode(value?: boolean) {
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