diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-12-14 14:01:30 -0600 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-12-18 16:31:56 -0600 |
commit | 8d822b1ece4f77e41214b81a3f1c92f8b1a65fe9 (patch) | |
tree | e574a864e0ac5d8d07742ca94bdab0c75360c3fc | |
parent | 38c5baeee1b42bfe29fa66af7c9bbe9cca1c99f7 (diff) | |
download | gitlab-ce-8d822b1ece4f77e41214b81a3f1c92f8b1a65fe9.tar.gz |
added minChunks to the common_d3 bundlejivl-replace-d3-v3-v4
-rw-r--r-- | app/assets/javascripts/graphs/stat_graph_contributors.js | 6 | ||||
-rw-r--r-- | app/assets/javascripts/graphs/stat_graph_contributors_graph.js | 2 | ||||
-rw-r--r-- | config/webpack.config.js | 4 |
3 files changed, 4 insertions, 8 deletions
diff --git a/app/assets/javascripts/graphs/stat_graph_contributors.js b/app/assets/javascripts/graphs/stat_graph_contributors.js index 6170a897a2f..151a4ce012c 100644 --- a/app/assets/javascripts/graphs/stat_graph_contributors.js +++ b/app/assets/javascripts/graphs/stat_graph_contributors.js @@ -1,16 +1,10 @@ /* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, one-var, camelcase, one-var-declaration-per-line, quotes, no-param-reassign, quote-props, comma-dangle, prefer-template, max-len, no-return-assign, no-shadow */ import _ from 'underscore'; -<<<<<<< HEAD -======= -import { timeFormat } from 'd3-time-format'; ->>>>>>> Refactored d3 modules to instead of having a common_d3 dir, to use the micro modules instead import { ContributorsGraph, ContributorsAuthorGraph, ContributorsMasterGraph } from './stat_graph_contributors_graph'; import ContributorsStatGraphUtil from './stat_graph_contributors_util'; import { n__, s__, createDateTimeFormat, sprintf } from '../locale'; -const d3 = { timeFormat }; - export default (function() { function ContributorsStatGraph() { this.dateFormat = createDateTimeFormat({ year: 'numeric', month: 'long', day: 'numeric' }); diff --git a/app/assets/javascripts/graphs/stat_graph_contributors_graph.js b/app/assets/javascripts/graphs/stat_graph_contributors_graph.js index 38406aa6574..9a4012232a0 100644 --- a/app/assets/javascripts/graphs/stat_graph_contributors_graph.js +++ b/app/assets/javascripts/graphs/stat_graph_contributors_graph.js @@ -1,6 +1,5 @@ /* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, max-len, no-restricted-syntax, vars-on-top, no-use-before-define, no-param-reassign, new-cap, no-underscore-dangle, wrap-iife, comma-dangle, no-return-assign, prefer-arrow-callback, quotes, prefer-template, newline-per-chained-call, no-else-return, no-shadow */ import _ from 'underscore'; -import { dateTickFormat } from '../lib/utils/tick_formats'; import { extent, max } from 'd3-array'; import { select, event as d3Event } from 'd3-selection'; import { scaleTime, scaleLinear } from 'd3-scale'; @@ -8,6 +7,7 @@ import { axisLeft, axisBottom } from 'd3-axis'; import { area } from 'd3-shape'; import { brushX } from 'd3-brush'; import { timeParse } from 'd3-time-format'; +import { dateTickFormat } from '../lib/utils/tick_formats'; const d3 = { extent, max, select, scaleTime, scaleLinear, axisLeft, axisBottom, area, brushX, timeParse }; diff --git a/config/webpack.config.js b/config/webpack.config.js index bca27b0a41b..63af5f75ecd 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -32,7 +32,6 @@ var config = { boards: './boards/boards_bundle.js', common: './commons/index.js', common_vue: './vue_shared/vue_resource_interceptor.js', - common_d3: ['d3-selection', 'd3-scale', 'd3-array', 'd3-time-format', 'd3-shape', 'd3-time', 'd3-axis', 'd3-brush'], cycle_analytics: './cycle_analytics/cycle_analytics_bundle.js', commit_pipelines: './commit/pipelines/pipelines_bundle.js', deploy_keys: './deploy_keys/index.js', @@ -224,6 +223,9 @@ var config = { 'monitoring', 'users', ], + minChunks: function (module, count) { + return module.resource && /d3-/.test(module.resource); + }, }), // create cacheable common library bundles |