Commit 2d2e0b7d authored by Mike Greiling's avatar Mike Greiling

refactor stat_graph_contributors_graph to es6 module syntax

parent 2f09c23c
require('./stat_graph_contributors_graph');
require('./stat_graph_contributors'); require('./stat_graph_contributors');
/* 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 */ /* 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 */
/* global ContributorsGraph */
/* global ContributorsAuthorGraph */ import { ContributorsGraph, ContributorsAuthorGraph, ContributorsMasterGraph } from './stat_graph_contributors_graph';
/* global ContributorsMasterGraph */
import ContributorsStatGraphUtil from './stat_graph_contributors_util'; import ContributorsStatGraphUtil from './stat_graph_contributors_util';
/* global d3 */ /* global d3 */
......
/* eslint-disable func-names, space-before-function-paren, one-var, 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 */ /* 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 */
/* global d3 */
/* global ContributorsGraph */
window.d3 = require('d3'); import d3 from 'd3';
(function() { const bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; };
var bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; }, const extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, const hasProp = {}.hasOwnProperty;
hasProp = {}.hasOwnProperty;
this.ContributorsGraph = (function() { export const ContributorsGraph = (function() {
function ContributorsGraph() {} function ContributorsGraph() {}
ContributorsGraph.prototype.MARGIN = { ContributorsGraph.prototype.MARGIN = {
...@@ -91,9 +88,9 @@ window.d3 = require('d3'); ...@@ -91,9 +88,9 @@ window.d3 = require('d3');
}; };
return ContributorsGraph; return ContributorsGraph;
})(); })();
this.ContributorsMasterGraph = (function(superClass) { export const ContributorsMasterGraph = (function(superClass) {
extend(ContributorsMasterGraph, superClass); extend(ContributorsMasterGraph, superClass);
function ContributorsMasterGraph(data1) { function ContributorsMasterGraph(data1) {
...@@ -195,9 +192,9 @@ window.d3 = require('d3'); ...@@ -195,9 +192,9 @@ window.d3 = require('d3');
}; };
return ContributorsMasterGraph; return ContributorsMasterGraph;
})(ContributorsGraph); })(ContributorsGraph);
this.ContributorsAuthorGraph = (function(superClass) { export const ContributorsAuthorGraph = (function(superClass) {
extend(ContributorsAuthorGraph, superClass); extend(ContributorsAuthorGraph, superClass);
function ContributorsAuthorGraph(data1) { function ContributorsAuthorGraph(data1) {
...@@ -272,5 +269,4 @@ window.d3 = require('d3'); ...@@ -272,5 +269,4 @@ window.d3 = require('d3');
}; };
return ContributorsAuthorGraph; return ContributorsAuthorGraph;
})(ContributorsGraph); })(ContributorsGraph);
}).call(window);
/* eslint-disable quotes, jasmine/no-suite-dupes, vars-on-top, no-var, max-len */ /* eslint-disable quotes, jasmine/no-suite-dupes, vars-on-top, no-var */
/* global d3 */
/* global ContributorsGraph */
/* global ContributorsMasterGraph */
require('~/graphs/stat_graph_contributors_graph'); import d3 from 'd3';
import { ContributorsGraph, ContributorsMasterGraph } from '~/graphs/stat_graph_contributors_graph';
describe("ContributorsGraph", function () { describe("ContributorsGraph", function () {
describe("#set_x_domain", function () { describe("#set_x_domain", function () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment