Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Molstar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Malý
Molstar
Commits
dda43370
Commit
dda43370
authored
May 8, 2020
by
Alexander Rose
Browse files
Options
Downloads
Patches
Plain Diff
add setProductionMode, setDebugMode exports
parent
92c1e979
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/apps/viewer/index.ts
+2
-0
2 additions, 0 deletions
src/apps/viewer/index.ts
src/mol-util/debug.ts
+8
-9
8 additions, 9 deletions
src/mol-util/debug.ts
with
10 additions
and
9 deletions
src/apps/viewer/index.ts
+
2
−
0
View file @
dda43370
...
@@ -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
),
...
...
This diff is collapsed.
Click to expand it.
src/mol-util/debug.ts
+
8
−
9
View file @
dda43370
/**
/**
* 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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment