Skip to content

Commit 3e721e1

Browse files
committed
add dev declarations.
1 parent 71b5d2b commit 3e721e1

32 files changed

+43
-14
lines changed

Diff for: .jshintrc

-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
"white": false,
6666

6767
"predef": [
68-
"__DEV__",
6968
"global"
7069
]
7170
}

Diff for: build/config.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ function getPathBasedOnECharts(path) {
1515
* @param {boolean} [addBundleVersion=false]
1616
*/
1717
function getPlugins(min, lang, addBundleVersion) {
18-
let plugins = [
19-
ecDevPlugin()
20-
];
18+
let plugins = [];
2119

2220
lang && plugins.push(
2321
ecLangPlugin({lang})

Diff for: src/chart/bar/BarView.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../../config';
12
import * as echarts from '../../echarts';
23
import * as zrUtil from 'zrender/src/core/util';
34
import * as graphic from '../../util/graphic';

Diff for: src/chart/custom.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../config';
12
import * as echarts from '../echarts';
23
import * as zrUtil from 'zrender/src/core/util';
34
import * as graphicUtil from '../util/graphic';

Diff for: src/chart/heatmap/HeatmapView.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../../config';
12
import * as echarts from '../../echarts';
23
import * as graphic from '../../util/graphic';
34
import HeatmapLayer from './HeatmapLayer';

Diff for: src/chart/helper/createListFromArray.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../../config';
12
import * as zrUtil from 'zrender/src/core/util';
23
import List from '../../data/List';
34
import completeDimensions from '../../data/helper/completeDimensions';

Diff for: src/chart/line/LineSeries.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../../config';
12
import createListFromArray from '../helper/createListFromArray';
23
import SeriesModel from '../../model/Series';
34

Diff for: src/chart/line/LineView.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// FIXME step not support polar
22

3+
import {__DEV__} from '../../config';
34
import * as zrUtil from 'zrender/src/core/util';
45
import SymbolDraw from '../helper/SymbolDraw';
56
import SymbolClz from '../helper/Symbol';

Diff for: src/chart/lines/LinesSeries.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../../config';
12
import SeriesModel from '../../model/Series';
23
import List from '../../data/List';
34
import * as zrUtil from 'zrender/src/core/util';

Diff for: src/chart/lines/LinesView.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../../config';
12
import * as echarts from '../../echarts';
23
import LineDraw from '../helper/LineDraw';
34
import EffectLine from '../helper/EffectLine';

Diff for: src/chart/lines/linesLayout.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../../config';
12

23
export default function (ecModel) {
34
ecModel.eachSeriesByType('lines', function (seriesModel) {

Diff for: src/component/axis/AxisView.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../../config';
12
import * as echarts from '../../echarts';
23
import * as axisPointerModelHelper from '../axisPointer/modelHelper';
34

Diff for: src/component/brush/BrushModel.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../../config';
12
import * as echarts from '../../echarts';
23
import * as zrUtil from 'zrender/src/core/util';
34
import * as visualSolution from '../../visual/visualSolution';

Diff for: src/component/dataZoom/DataZoomModel.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../../config';
12
import * as echarts from '../../echarts';
23
import * as zrUtil from 'zrender/src/core/util';
34
import env from 'zrender/src/core/env';

Diff for: src/component/graphic.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../config';
12
import * as echarts from '../echarts';
23
import * as zrUtil from 'zrender/src/core/util';
34

Diff for: src/component/helper/BrushController.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../../config';
12
import * as zrUtil from 'zrender/src/core/util';
23
import Eventful from 'zrender/src/mixin/Eventful';
34
import * as graphic from '../../util/graphic';

Diff for: src/component/helper/BrushTargetManager.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../../config';
12
import * as zrUtil from 'zrender/src/core/util';
23
import * as graphic from '../../util/graphic';
34
import * as modelUtil from '../../util/model';

Diff for: src/component/legend/LegendView.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../../config';
12
import * as echarts from '../../echarts';
23
import * as zrUtil from 'zrender/src/core/util';
34
import {createSymbol} from '../../util/symbol';

Diff for: src/component/marker/MarkerModel.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../../config';
12
import * as echarts from '../../echarts';
23
import * as zrUtil from 'zrender/src/core/util';
34
import env from 'zrender/src/core/env';

Diff for: src/component/radar/RadarView.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../../config';
12
import * as echarts from '../../echarts';
23
import * as zrUtil from 'zrender/src/core/util';
34
import AxisBuilder from '../axis/AxisBuilder';

Diff for: src/component/visualMap/PiecewiseModel.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../../config';
12
import * as zrUtil from 'zrender/src/core/util';
23
import VisualMapModel from './VisualMapModel';
34
import VisualMapping from '../../visual/VisualMapping';

Diff for: src/config.js

+13-10
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22
// Enable DEV mode when using source code without build. which has no __DEV__ variable
33
// In build process 'typeof __DEV__' will be replace with 'boolean'
44
// So this code will be removed or disabled anyway after built.
5-
if (typeof __DEV__ === 'undefined') {
6-
// In browser
7-
if (typeof window !== 'undefined') {
8-
window.__DEV__ = true;
9-
}
10-
// In node
11-
else if (typeof global !== 'undefined') {
12-
global.__DEV__ = true;
13-
}
14-
}
5+
// if (typeof __DEV__ === 'undefined') {
6+
// // In browser
7+
// if (typeof window !== 'undefined') {
8+
// window.__DEV__ = true;
9+
// }
10+
// // In node
11+
// else if (typeof global !== 'undefined') {
12+
// global.__DEV__ = true;
13+
// }
14+
// }
15+
16+
export var __DEV__ = true;
17+

Diff for: src/coord/axisHelper.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../config';
12
import * as zrUtil from 'zrender/src/core/util';
23
import * as textContain from 'zrender/src/contain/text';
34
import OrdinalScale from '../scale/Ordinal';

Diff for: src/coord/cartesian/Grid.js

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* TODO Default cartesian
55
*/
66

7+
import {__DEV__} from '../../config';
78
import * as zrUtil from 'zrender/src/core/util';
89
import BoundingRect from 'zrender/src/core/BoundingRect';
910
import {getLayoutRect} from '../../util/layout';

Diff for: src/coord/geo/geoCreator.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../../config';
12
import * as echarts from '../../echarts';
23
import * as zrUtil from 'zrender/src/core/util';
34
import Geo from './Geo';

Diff for: src/coord/polar/polarCreator.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// TODO Axis scale
22

3+
import {__DEV__} from '../../config';
34
import * as zrUtil from 'zrender/src/core/util';
45
import Polar from './Polar';
56
import {parsePercent} from '../../util/number';

Diff for: src/data/Graph.js

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* @author Yi Shen(https://www.github.com/pissang)
66
*/
77

8+
import {__DEV__} from '../config';
89
import * as zrUtil from 'zrender/src/core/util';
910

1011
// id may be function name of Object, add a prefix to avoid this problem.

Diff for: src/data/List.js

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* @module echarts/data/List
44
*/
55

6+
import {__DEV__} from '../config';
67
import * as zrUtil from 'zrender/src/core/util';
78
import Model from '../model/Model';
89
import DataDiffer from './DataDiffer';

Diff for: src/echarts.js

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* https://github.com/ecomfe/echarts/blob/master/LICENSE.txt
1010
*/
1111

12+
import {__DEV__} from './config';
1213
import * as zrender from 'zrender/src/zrender';
1314
import * as zrUtil from 'zrender/src/core/util';
1415
import * as colorTool from 'zrender/src/tool/color';

Diff for: src/model/Global.js

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
* `mergeOption` in module:echarts/model/OptionManager.
1919
*/
2020

21+
import {__DEV__} from '../config';
2122
import * as zrUtil from 'zrender/src/core/util';
2223
import * as modelUtil from '../util/model';
2324
import Model from './Model';

Diff for: src/model/Series.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../config';
12
import * as zrUtil from 'zrender/src/core/util';
23
import env from 'zrender/src/core/env';
34
import {

Diff for: src/util/clazz.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {__DEV__} from '../config';
12
import * as zrUtil from 'zrender/src/core/util';
23

34
var TYPE_DELIMITER = '.';

0 commit comments

Comments
 (0)