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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Malý
Molstar
Commits
9973a067
Commit
9973a067
authored
6 years ago
by
Alexander Rose
Browse files
Options
Downloads
Patches
Plain Diff
debug mode tweaks
parent
67f7d306
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+2
-12
2 additions, 12 deletions
README.md
src/mol-plugin/context.ts
+3
-0
3 additions, 0 deletions
src/mol-plugin/context.ts
src/mol-util/debug.ts
+2
-2
2 additions, 2 deletions
src/mol-util/debug.ts
webpack.config.js
+2
-0
2 additions, 0 deletions
webpack.config.js
with
9 additions
and
14 deletions
README.md
+
2
−
12
View file @
9973a067
...
@@ -55,19 +55,9 @@ This project builds on experience from previous solutions:
...
@@ -55,19 +55,9 @@ This project builds on experience from previous solutions:
### Build automatically on file save:
### Build automatically on file save:
npm run watch
npm run watch
npm run watch-extra
### Build/watch mol-viewer
### With debug mode enabled:
**Build**
DEBUG=molstar npm run watch
npm run build
npm run build-viewer
**Watch**
npm run watch
npm run watch-extra
npm run watch-viewer
**Run**
**Run**
...
...
This diff is collapsed.
Click to expand it.
src/mol-plugin/context.ts
+
3
−
0
View file @
9973a067
...
@@ -34,6 +34,7 @@ import { StructureElementSelectionManager } from './util/structure-element-selec
...
@@ -34,6 +34,7 @@ import { StructureElementSelectionManager } from './util/structure-element-selec
import
{
SubstructureParentHelper
}
from
'
./util/substructure-parent-helper
'
;
import
{
SubstructureParentHelper
}
from
'
./util/substructure-parent-helper
'
;
import
{
Representation
}
from
'
mol-repr/representation
'
;
import
{
Representation
}
from
'
mol-repr/representation
'
;
import
{
ModifiersKeys
}
from
'
mol-util/input/input-observer
'
;
import
{
ModifiersKeys
}
from
'
mol-util/input/input-observer
'
;
import
{
isProductionMode
,
isDebugMode
}
from
'
mol-util/debug
'
;
export
class
PluginContext
{
export
class
PluginContext
{
private
disposed
=
false
;
private
disposed
=
false
;
...
@@ -225,5 +226,7 @@ export class PluginContext {
...
@@ -225,5 +226,7 @@ export class PluginContext {
this
.
lociLabels
=
new
LociLabelManager
(
this
);
this
.
lociLabels
=
new
LociLabelManager
(
this
);
this
.
log
.
message
(
`Mol* Plugin
${
PLUGIN_VERSION
}
[
${
PLUGIN_VERSION_DATE
.
toLocaleString
()}
]`
);
this
.
log
.
message
(
`Mol* Plugin
${
PLUGIN_VERSION
}
[
${
PLUGIN_VERSION_DATE
.
toLocaleString
()}
]`
);
if
(
!
isProductionMode
)
this
.
log
.
message
(
`Development mode enabled`
);
if
(
isDebugMode
)
this
.
log
.
message
(
`Debug mode enabled`
);
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/mol-util/debug.ts
+
2
−
2
View file @
9973a067
...
@@ -12,8 +12,8 @@ const isProductionMode = process.env.NODE_ENV === 'production'
...
@@ -12,8 +12,8 @@ const isProductionMode = process.env.NODE_ENV === 'production'
/**
/**
* set to true to enable more comprehensive checks and assertions,
* set to true to enable more comprehensive checks and assertions,
* mos
l
ty used in `mol-gl`
* most
l
y used in `mol-gl`
*/
*/
const
isDebugMode
=
false
const
isDebugMode
=
process
.
env
.
DEBUG
===
'
*
'
||
process
.
env
.
DEBUG
===
'
molstar
'
export
{
isProductionMode
,
isDebugMode
}
export
{
isProductionMode
,
isDebugMode
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
webpack.config.js
+
2
−
0
View file @
9973a067
...
@@ -49,6 +49,8 @@ const sharedConfig = {
...
@@ -49,6 +49,8 @@ const sharedConfig = {
}),
}),
new
webpack
.
DefinePlugin
({
new
webpack
.
DefinePlugin
({
__PLUGIN_VERSION_TIMESTAMP__
:
webpack
.
DefinePlugin
.
runtimeValue
(()
=>
`
${
new
Date
().
valueOf
()}
`
,
true
),
__PLUGIN_VERSION_TIMESTAMP__
:
webpack
.
DefinePlugin
.
runtimeValue
(()
=>
`
${
new
Date
().
valueOf
()}
`
,
true
),
'
process.env.NODE_ENV
'
:
JSON
.
stringify
(
process
.
env
.
NODE_ENV
),
'
process.env.DEBUG
'
:
JSON
.
stringify
(
process
.
env
.
DEBUG
)
}),
}),
new
MiniCssExtractPlugin
({
filename
:
'
app.css
'
})
new
MiniCssExtractPlugin
({
filename
:
'
app.css
'
})
],
],
...
...
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