Switch most requires to imports (#6935)

This commit is contained in:
Ben McCann
2020-01-09 04:23:53 -08:00
committed by Evert Timberg
parent 16bb94ebc1
commit c6c4a52257
25 changed files with 160 additions and 135 deletions

View File

@@ -1,6 +1,11 @@
'use strict';
module.exports = {};
module.exports.filler = require('./plugin.filler');
module.exports.legend = require('./plugin.legend');
module.exports.title = require('./plugin.title');
import filler from './plugin.filler';
import legend from './plugin.legend';
import title from './plugin.title';
export default {
filler,
legend,
title
};

View File

@@ -1,9 +1,9 @@
'use strict';
const defaults = require('../core/core.defaults');
const Element = require('../core/core.element');
const helpers = require('../helpers/index');
const layouts = require('../core/core.layouts');
import defaults from '../core/core.defaults';
import Element from '../core/core.element';
import helpers from '../helpers';
import layouts from '../core/core.layouts';
const getRtlHelper = helpers.rtl.getRtlAdapter;
const valueOrDefault = helpers.valueOrDefault;
@@ -572,7 +572,7 @@ function createNewLegendAndAttach(chart, legendOpts) {
chart.legend = legend;
}
module.exports = {
export default {
id: 'legend',
/**

View File

@@ -1,9 +1,9 @@
'use strict';
const defaults = require('../core/core.defaults');
const Element = require('../core/core.element');
const helpers = require('../helpers/index');
const layouts = require('../core/core.layouts');
import defaults from '../core/core.defaults';
import Element from '../core/core.element';
import helpers from '../helpers/index';
import layouts from '../core/core.layouts';
defaults._set('title', {
align: 'center',
@@ -216,7 +216,7 @@ function createNewTitleBlockAndAttach(chart, titleOpts) {
chart.titleBlock = title;
}
module.exports = {
export default {
id: 'title',
/**