mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-04 23:44:05 +01:00
Rename platform/platform to index removing default (#7391)
Rename platform/platform to index removing default
This commit is contained in:
@@ -4,7 +4,7 @@ import defaults from './core.defaults';
|
||||
import helpers from '../helpers/index';
|
||||
import Interaction from './core.interaction';
|
||||
import layouts from './core.layouts';
|
||||
import {BasicPlatform, DomPlatform} from '../platform/platforms';
|
||||
import {BasicPlatform, DomPlatform} from '../platform';
|
||||
import plugins from './core.plugins';
|
||||
import scaleService from './core.scaleService';
|
||||
import {getMaximumWidth, getMaximumHeight} from '../helpers/helpers.dom';
|
||||
|
||||
@@ -17,7 +17,7 @@ import Element from './core/core.element';
|
||||
import * as elements from './elements/index';
|
||||
import Interaction from './core/core.interaction';
|
||||
import layouts from './core/core.layouts';
|
||||
import platforms from './platform/platforms';
|
||||
import * as platforms from './platform';
|
||||
import pluginsCore from './core/core.plugins';
|
||||
import Scale from './core/core.scale';
|
||||
import scaleService from './core/core.scaleService';
|
||||
|
||||
3
src/platform/index.js
Normal file
3
src/platform/index.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export {default as BasePlatform} from './platform.base';
|
||||
export {default as BasicPlatform} from './platform.basic';
|
||||
export {default as DomPlatform} from './platform.dom';
|
||||
@@ -1,11 +0,0 @@
|
||||
import BasePlatform from './platform.base';
|
||||
import BasicPlatform from './platform.basic';
|
||||
import DomPlatform from './platform.dom';
|
||||
|
||||
export {BasicPlatform, DomPlatform, BasePlatform};
|
||||
|
||||
/**
|
||||
* @namespace Chart.platforms
|
||||
* @see https://chartjs.gitbooks.io/proposals/content/Platform.html
|
||||
*/
|
||||
export default {BasicPlatform, DomPlatform, BasePlatform};
|
||||
@@ -12,7 +12,11 @@ describe('Chart namespace', function() {
|
||||
expect(Chart.Interaction instanceof Object).toBeTruthy();
|
||||
expect(Chart.layouts instanceof Object).toBeTruthy();
|
||||
expect(Chart.plugins instanceof Object).toBeTruthy();
|
||||
expect(Chart.platforms instanceof Object).toBeTruthy();
|
||||
|
||||
expect(Chart.platforms.BasePlatform instanceof Function).toBeTruthy();
|
||||
expect(Chart.platforms.BasicPlatform instanceof Function).toBeTruthy();
|
||||
expect(Chart.platforms.DomPlatform instanceof Function).toBeTruthy();
|
||||
|
||||
expect(Chart.Scale instanceof Object).toBeTruthy();
|
||||
expect(Chart.scaleService instanceof Object).toBeTruthy();
|
||||
expect(Chart.Ticks instanceof Object).toBeTruthy();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {DomPlatform} from '../../src/platform/platforms';
|
||||
import {DomPlatform} from '../../src/platform';
|
||||
|
||||
describe('Platform.dom', function() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user