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
ec918071
Commit
ec918071
authored
Mar 02, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create a cacheable commons bundle for d3 library
parent
1f974331
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
6 deletions
+13
-6
app/assets/javascripts/lib/d3.js
app/assets/javascripts/lib/d3.js
+0
-3
app/assets/javascripts/users/calendar.js
app/assets/javascripts/users/calendar.js
+2
-1
app/views/projects/graphs/charts.html.haml
app/views/projects/graphs/charts.html.haml
+1
-0
app/views/projects/graphs/show.html.haml
app/views/projects/graphs/show.html.haml
+1
-0
app/views/projects/pipelines/charts.html.haml
app/views/projects/pipelines/charts.html.haml
+1
-0
app/views/users/show.html.haml
app/views/users/show.html.haml
+1
-1
config/webpack.config.js
config/webpack.config.js
+7
-1
No files found.
app/assets/javascripts/lib/d3.js
deleted
100644 → 0
View file @
1f974331
/* eslint-disable func-names, space-before-function-paren */
window
.
d3
=
require
(
'
d3
'
);
app/assets/javascripts/users/calendar.js
View file @
ec918071
/* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, camelcase, vars-on-top, object-shorthand, comma-dangle, eqeqeq, no-mixed-operators, no-return-assign, newline-per-chained-call, prefer-arrow-callback, consistent-return, one-var, one-var-declaration-per-line, prefer-template, quotes, no-unused-vars, no-else-return, max-len */
/* global d3 */
import
d3
from
'
d3
'
;
(
function
()
{
var
bind
=
function
(
fn
,
me
)
{
return
function
()
{
return
fn
.
apply
(
me
,
arguments
);
};
};
...
...
app/views/projects/graphs/charts.html.haml
View file @
ec918071
-
@no_container
=
true
-
page_title
"Charts"
-
content_for
:page_specific_javascripts
do
=
page_specific_javascript_bundle_tag
(
'common_d3'
)
=
page_specific_javascript_bundle_tag
(
'graphs'
)
=
render
"projects/commits/head"
...
...
app/views/projects/graphs/show.html.haml
View file @
ec918071
-
@no_container
=
true
-
page_title
"Contributors"
-
content_for
:page_specific_javascripts
do
=
page_specific_javascript_bundle_tag
(
'common_d3'
)
=
page_specific_javascript_bundle_tag
(
'graphs'
)
=
render
'projects/commits/head'
...
...
app/views/projects/pipelines/charts.html.haml
View file @
ec918071
-
@no_container
=
true
-
page_title
"Charts"
,
"Pipelines"
-
content_for
:page_specific_javascripts
do
=
page_specific_javascript_bundle_tag
(
'common_d3'
)
=
page_specific_javascript_bundle_tag
(
'graphs'
)
=
render
'head'
...
...
app/views/users/show.html.haml
View file @
ec918071
-
page_title
@user
.
name
-
page_description
@user
.
bio
-
content_for
:page_specific_javascripts
do
=
page_specific_javascript_bundle_tag
(
'
lib
_d3'
)
=
page_specific_javascript_bundle_tag
(
'
common
_d3'
)
=
page_specific_javascript_bundle_tag
(
'users'
)
-
header_title
@user
.
name
,
user_path
(
@user
)
-
@no_container
=
true
...
...
config/webpack.config.js
View file @
ec918071
...
...
@@ -19,6 +19,7 @@ var config = {
entry
:
{
common
:
'
./commons/index.js
'
,
common_vue
:
[
'
vue
'
,
'
vue-resource
'
],
common_d3
:
[
'
d3
'
],
application
:
'
./application.js
'
,
blob_edit
:
'
./blob_edit/blob_edit_bundle.js
'
,
boards
:
'
./boards/boards_bundle.js
'
,
...
...
@@ -40,7 +41,6 @@ var config = {
snippet
:
'
./snippet/snippet_bundle.js
'
,
terminal
:
'
./terminal/terminal_bundle.js
'
,
users
:
'
./users/users_bundle.js
'
,
lib_d3
:
'
./lib/d3.js
'
,
vue_pipelines
:
'
./vue_pipelines_index/index.js
'
,
},
...
...
@@ -116,6 +116,12 @@ var config = {
},
}),
// create cacheable common library bundle for all d3 chunks
new
webpack
.
optimize
.
CommonsChunkPlugin
({
name
:
'
common_d3
'
,
chunks
:
[
'
graphs
'
,
'
users
'
],
}),
// create cacheable common library bundles
new
webpack
.
optimize
.
CommonsChunkPlugin
({
names
:
[
'
application
'
,
'
common
'
,
'
manifest
'
],
...
...
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