Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
e2c87838
Commit
e2c87838
authored
Mar 01, 2018
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
migrate notebook_viewer to dynamic import
parent
2d8966f7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
7 deletions
+4
-7
app/assets/javascripts/blob/notebook_viewer.js
app/assets/javascripts/blob/notebook_viewer.js
+1
-1
app/assets/javascripts/blob/viewer/index.js
app/assets/javascripts/blob/viewer/index.js
+3
-0
app/views/projects/blob/viewers/_notebook.html.haml
app/views/projects/blob/viewers/_notebook.html.haml
+0
-4
config/webpack.config.js
config/webpack.config.js
+0
-2
No files found.
app/assets/javascripts/blob/notebook_viewer.js
View file @
e2c87838
import
renderNotebook
from
'
./notebook
'
;
import
renderNotebook
from
'
./notebook
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
renderNotebook
)
;
export
default
renderNotebook
;
app/assets/javascripts/blob/viewer/index.js
View file @
e2c87838
...
@@ -32,6 +32,9 @@ export default class BlobViewer {
...
@@ -32,6 +32,9 @@ export default class BlobViewer {
case
'
balsamiq
'
:
case
'
balsamiq
'
:
initViewer
(
import
(
/* webpackChunkName: 'balsamiq_viewer' */
'
../balsamiq_viewer
'
));
initViewer
(
import
(
/* webpackChunkName: 'balsamiq_viewer' */
'
../balsamiq_viewer
'
));
break
;
break
;
case
'
notebook
'
:
initViewer
(
import
(
/* webpackChunkName: 'notebook_viewer' */
'
../notebook_viewer
'
));
break
;
default
:
default
:
break
;
break
;
}
}
...
...
app/views/projects/blob/viewers/_notebook.html.haml
View file @
e2c87838
-
content_for
:page_specific_javascripts
do
=
webpack_bundle_tag
(
'common_vue'
)
=
webpack_bundle_tag
(
'notebook_viewer'
)
.file-content
#js-notebook-viewer
{
data:
{
endpoint:
blob_raw_path
}
}
.file-content
#js-notebook-viewer
{
data:
{
endpoint:
blob_raw_path
}
}
config/webpack.config.js
View file @
e2c87838
...
@@ -45,7 +45,6 @@ function generateEntries() {
...
@@ -45,7 +45,6 @@ function generateEntries() {
const
manualEntries
=
{
const
manualEntries
=
{
monitoring
:
'
./monitoring/monitoring_bundle.js
'
,
monitoring
:
'
./monitoring/monitoring_bundle.js
'
,
mr_notes
:
'
./mr_notes/index.js
'
,
mr_notes
:
'
./mr_notes/index.js
'
,
notebook_viewer
:
'
./blob/notebook_viewer.js
'
,
pdf_viewer
:
'
./blob/pdf_viewer.js
'
,
pdf_viewer
:
'
./blob/pdf_viewer.js
'
,
protected_branches
:
'
./protected_branches
'
,
protected_branches
:
'
./protected_branches
'
,
registry_list
:
'
./registry/index.js
'
,
registry_list
:
'
./registry/index.js
'
,
...
@@ -225,7 +224,6 @@ const config = {
...
@@ -225,7 +224,6 @@ const config = {
chunks
:
[
chunks
:
[
'
monitoring
'
,
'
monitoring
'
,
'
mr_notes
'
,
'
mr_notes
'
,
'
notebook_viewer
'
,
'
pdf_viewer
'
,
'
pdf_viewer
'
,
'
registry_list
'
,
'
registry_list
'
,
'
ide
'
,
'
ide
'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment