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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
254c43fb
Commit
254c43fb
authored
Feb 27, 2018
by
Clement Ho
Committed by
Jacob Schatz
Feb 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove snippet bundle webpack entry point
parent
11196289
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
14 deletions
+25
-14
app/assets/javascripts/pages/projects/snippets/edit/index.js
app/assets/javascripts/pages/projects/snippets/edit/index.js
+5
-1
app/assets/javascripts/pages/projects/snippets/new/index.js
app/assets/javascripts/pages/projects/snippets/new/index.js
+5
-1
app/assets/javascripts/pages/snippets/edit/index.js
app/assets/javascripts/pages/snippets/edit/index.js
+5
-1
app/assets/javascripts/pages/snippets/new/index.js
app/assets/javascripts/pages/snippets/new/index.js
+5
-1
app/assets/javascripts/snippet/snippet_bundle.js
app/assets/javascripts/snippet/snippet_bundle.js
+5
-8
app/views/shared/snippets/_form.html.haml
app/views/shared/snippets/_form.html.haml
+0
-1
config/webpack.config.js
config/webpack.config.js
+0
-1
No files found.
app/assets/javascripts/pages/projects/snippets/edit/index.js
View file @
254c43fb
import
initSnippet
from
'
~/snippet/snippet_bundle
'
;
import
initForm
from
'
~/pages/projects/init_form
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
initForm
(
$
(
'
.snippet-form
'
)));
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
initSnippet
();
initForm
(
$
(
'
.snippet-form
'
));
});
app/assets/javascripts/pages/projects/snippets/new/index.js
View file @
254c43fb
import
initSnippet
from
'
~/snippet/snippet_bundle
'
;
import
initForm
from
'
~/pages/projects/init_form
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
initForm
(
$
(
'
.snippet-form
'
)));
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
initSnippet
();
initForm
(
$
(
'
.snippet-form
'
));
});
app/assets/javascripts/pages/snippets/edit/index.js
View file @
254c43fb
import
initSnippet
from
'
~/snippet/snippet_bundle
'
;
import
form
from
'
../form
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
form
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
initSnippet
();
form
();
});
app/assets/javascripts/pages/snippets/new/index.js
View file @
254c43fb
import
initSnippet
from
'
~/snippet/snippet_bundle
'
;
import
form
from
'
../form
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
form
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
initSnippet
();
form
();
});
app/assets/javascripts/snippet/snippet_bundle.js
View file @
254c43fb
/* eslint-disable func-names, space-before-function-paren, prefer-arrow-callback, no-var, quotes, max-len */
/* global ace */
(
function
()
{
$
(
function
()
{
var
editor
=
ace
.
edit
(
"
editor
"
);
export
default
()
=>
{
const
editor
=
ace
.
edit
(
'
editor
'
);
$
(
"
.snippet-form-holder form
"
).
on
(
'
submit
'
,
function
()
{
$
(
"
.snippet-file-content
"
).
val
(
editor
.
getValue
());
});
$
(
'
.snippet-form-holder form
'
).
on
(
'
submit
'
,
()
=>
{
$
(
'
.snippet-file-content
'
).
val
(
editor
.
getValue
());
});
}
).
call
(
window
)
;
};
app/views/shared/snippets/_form.html.haml
View file @
254c43fb
-
content_for
:page_specific_javascripts
do
=
page_specific_javascript_tag
(
'lib/ace.js'
)
=
webpack_bundle_tag
(
'snippet'
)
.snippet-form-holder
=
form_for
@snippet
,
url:
url
,
html:
{
class:
"form-horizontal snippet-form js-requires-input js-quick-submit common-note-form"
}
do
|
f
|
...
...
config/webpack.config.js
View file @
254c43fb
...
...
@@ -59,7 +59,6 @@ function generateEntries() {
protected_branches
:
'
./protected_branches
'
,
protected_tags
:
'
./protected_tags
'
,
registry_list
:
'
./registry/index.js
'
,
snippet
:
'
./snippet/snippet_bundle.js
'
,
sketch_viewer
:
'
./blob/sketch_viewer.js
'
,
stl_viewer
:
'
./blob/stl_viewer.js
'
,
terminal
:
'
./terminal/terminal_bundle.js
'
,
...
...
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