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
744b04ed
Commit
744b04ed
authored
3 years ago
by
Alexander Rose
Browse files
Options
Downloads
Patches
Plain Diff
add demos to deploy script
- include analytics in deployed demos
parent
f2119b1d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
scripts/deploy.js
+23
-5
23 additions, 5 deletions
scripts/deploy.js
src/examples/alpha-orbitals/index.html
+1
-0
1 addition, 0 deletions
src/examples/alpha-orbitals/index.html
src/examples/lighting/index.html
+1
-0
1 addition, 0 deletions
src/examples/lighting/index.html
with
25 additions
and
5 deletions
scripts/deploy.js
+
23
−
5
View file @
744b04ed
/**
* Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
* Copyright (c) 2019
-2021
mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
...
...
@@ -39,6 +39,24 @@ function copyViewer() {
addAnalytics
(
path
.
resolve
(
viewerDeployPath
,
'
index.html
'
));
}
function
copyDemos
()
{
console
.
log
(
'
\n
###
'
,
'
copy demos files
'
);
const
lightingBuildPath
=
path
.
resolve
(
buildDir
,
'
../build/examples/lighting/
'
);
const
lightingDeployPath
=
path
.
resolve
(
localPath
,
'
demos/lighting/
'
);
fse
.
copySync
(
lightingBuildPath
,
lightingDeployPath
,
{
overwrite
:
true
});
addAnalytics
(
path
.
resolve
(
lightingDeployPath
,
'
index.html
'
));
const
orbitalsBuildPath
=
path
.
resolve
(
buildDir
,
'
../build/examples/alpha-orbitals/
'
);
const
orbitalsDeployPath
=
path
.
resolve
(
localPath
,
'
demos/alpha-orbitals/
'
);
fse
.
copySync
(
orbitalsBuildPath
,
orbitalsDeployPath
,
{
overwrite
:
true
});
addAnalytics
(
path
.
resolve
(
orbitalsDeployPath
,
'
index.html
'
));
}
function
copyFiles
()
{
copyViewer
();
copyDemos
();
}
if
(
!
fs
.
existsSync
(
localPath
))
{
console
.
log
(
'
\n
###
'
,
'
create localPath
'
);
fs
.
mkdirSync
(
localPath
,
{
recursive
:
true
});
...
...
@@ -52,9 +70,9 @@ if (!fs.existsSync(path.resolve(localPath, '.git/'))) {
.
outputHandler
(
log
)
.
clone
(
remoteUrl
,
localPath
)
.
fetch
([
'
--all
'
])
.
exec
(
copy
Viewer
)
.
exec
(
copy
Files
)
.
add
([
'
-A
'
])
.
commit
(
'
updated viewer
'
)
.
commit
(
'
updated viewer
& demos
'
)
.
push
();
}
else
{
console
.
log
(
'
\n
###
'
,
'
update repository
'
);
...
...
@@ -62,8 +80,8 @@ if (!fs.existsSync(path.resolve(localPath, '.git/'))) {
.
outputHandler
(
log
)
.
fetch
([
'
--all
'
])
.
reset
([
'
--hard
'
,
'
origin/master
'
])
.
exec
(
copy
Viewer
)
.
exec
(
copy
Files
)
.
add
([
'
-A
'
])
.
commit
(
'
updated viewer
'
)
.
commit
(
'
updated viewer
& demos
'
)
.
push
();
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/examples/alpha-orbitals/index.html
+
1
−
0
View file @
744b04ed
...
...
@@ -57,5 +57,6 @@
<script>
AlphaOrbitalsExample
.
init
(
'
app
'
)
</script>
<!-- __MOLSTAR_ANALYTICS__ -->
</body>
</html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/examples/lighting/index.html
+
1
−
0
View file @
744b04ed
...
...
@@ -84,5 +84,6 @@
$
(
'
controls
'
).
appendChild
(
h
);
}
</script>
<!-- __MOLSTAR_ANALYTICS__ -->
</body>
</html>
\ 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