summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/graphs
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2016-11-03 16:38:54 -0500
committerMike Greiling <mike@pixelcog.com>2017-01-10 12:30:38 -0600
commitfe964cc235ed22a5d013d5874284763b698aba7c (patch)
tree5529dd7d9deb13d511d37f7a8fed33de15aa6d7c /app/assets/javascripts/graphs
parent55f291e8ceae6d3d432039f72f6935c62fb2a872 (diff)
downloadgitlab-ce-fe964cc235ed22a5d013d5874284763b698aba7c.tar.gz
migrate all javascript asset bundles and require syntax
Diffstat (limited to 'app/assets/javascripts/graphs')
-rw-r--r--app/assets/javascripts/graphs/graphs_bundle.js15
-rw-r--r--app/assets/javascripts/graphs/stat_graph_contributors.js2
-rw-r--r--app/assets/javascripts/graphs/stat_graph_contributors_graph.js2
3 files changed, 5 insertions, 14 deletions
diff --git a/app/assets/javascripts/graphs/graphs_bundle.js b/app/assets/javascripts/graphs/graphs_bundle.js
index 32c26349da0..4f7777aa5bc 100644
--- a/app/assets/javascripts/graphs/graphs_bundle.js
+++ b/app/assets/javascripts/graphs/graphs_bundle.js
@@ -1,12 +1,3 @@
-/* eslint-disable func-names, space-before-function-paren */
-// This is a manifest file that'll be compiled into including all the files listed below.
-// Add new JavaScript code in separate files in this directory and they'll automatically
-// be included in the compiled file accessible from http://example.com/assets/application.js
-// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
-// the compiled file.
-//
-/*= require_tree . */
-
-(function() {
-
-}).call(this);
+// require everything else in this directory
+function requireAll(context) { return context.keys().map(context); }
+requireAll(require.context('.', false, /^\.\/(?!graphs_bundle).*\.(js|es6)$/));
diff --git a/app/assets/javascripts/graphs/stat_graph_contributors.js b/app/assets/javascripts/graphs/stat_graph_contributors.js
index 2d08a7c6ac3..c702ce2743d 100644
--- a/app/assets/javascripts/graphs/stat_graph_contributors.js
+++ b/app/assets/javascripts/graphs/stat_graph_contributors.js
@@ -5,7 +5,7 @@
/* global ContributorsStatGraphUtil */
/* global d3 */
-/*= require d3 */
+window.d3 = require('d3');
(function() {
this.ContributorsStatGraph = (function() {
diff --git a/app/assets/javascripts/graphs/stat_graph_contributors_graph.js b/app/assets/javascripts/graphs/stat_graph_contributors_graph.js
index 9c5e9381e52..3b7370bd8f6 100644
--- a/app/assets/javascripts/graphs/stat_graph_contributors_graph.js
+++ b/app/assets/javascripts/graphs/stat_graph_contributors_graph.js
@@ -2,7 +2,7 @@
/* global d3 */
/* global ContributorsGraph */
-/*= require d3 */
+window.d3 = require('d3');
(function() {
var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },