提交 adad150f 编写于 作者: S sushuang

tweak

上级 12820435
......@@ -37,16 +37,25 @@ module.exports = function () {
});
});
// prePulishSrc(path.resolve(ecDir, 'echarts.all.js'), path.resolve(ecDir, 'index.js'));
// prePulishSrc(path.resolve(ecDir, 'echarts.common.js'), path.resolve(ecDir, 'index.common.js'));
// prePulishSrc(path.resolve(ecDir, 'echarts.simple.js'), path.resolve(ecDir, 'index.simple.js'));
prePulishSrc({
inputPath: path.resolve(ecDir, 'echarts.all.js'),
outputPath: path.resolve(ecDir, 'index.js')
});
prePulishSrc({
inputPath: path.resolve(ecDir, 'echarts.common.js'),
outputPath: path.resolve(ecDir, 'index.common.js')
});
prePulishSrc({
inputPath: path.resolve(ecDir, 'echarts.simple.js'),
outputPath: path.resolve(ecDir, 'index.simple.js')
});
function transform({code, inputPath, outputPath}) {
if (inputPath === path.resolve(ecDir, 'src/echarts.js')) {
// Using `echarts/echarts.blank.js` to overwrite `echarts/lib/echarts.js`
// for including exports API.
code +=
`var ___ec_export = require("./export");
code += `
var ___ec_export = require("./export");
(function () {
for (var key in ___ec_export) {
if (___ec_export.hasOwnProperty(key)) {
......
var _echarts = require("./lib/echarts");
(function () {
for (var key in _echarts) {
if (_echarts == null || !_echarts.hasOwnProperty(key) || key === 'default' || key === '__esModule') return;
exports[key] = _echarts[key];
}
})();
var _export = require("./lib/export");
(function () {
......@@ -41,12 +48,4 @@ require("./lib/component/toolbox");
require("zrender/lib/vml/vml");
require("zrender/lib/svg/svg");
(function () {
for (var key in _echarts) {
if (_echarts == null || !_echarts.hasOwnProperty(key) || key === 'default' || key === '__esModule') return;
exports[key] = _echarts[key];
}
})();
\ No newline at end of file
require("zrender/lib/svg/svg");
\ No newline at end of file
var _echarts = require("./lib/echarts");
(function () {
for (var key in _echarts) {
if (_echarts == null || !_echarts.hasOwnProperty(key) || key === 'default' || key === '__esModule') return;
exports[key] = _echarts[key];
}
})();
var _export = require("./lib/export");
......@@ -92,11 +98,4 @@ require("./lib/component/toolbox");
require("zrender/lib/vml/vml");
require("zrender/lib/svg/svg");
(function () {
for (var key in _echarts) {
if (_echarts == null || !_echarts.hasOwnProperty(key) || key === 'default' || key === '__esModule') return;
exports[key] = _echarts[key];
}
})();
\ No newline at end of file
require("zrender/lib/svg/svg");
\ No newline at end of file
var _echarts = require("./lib/echarts");
(function () {
for (var key in _echarts) {
if (_echarts == null || !_echarts.hasOwnProperty(key) || key === 'default' || key === '__esModule') return;
exports[key] = _echarts[key];
}
})();
require("./lib/chart/line");
require("./lib/chart/bar");
require("./lib/chart/pie");
require("./lib/component/gridSimple");
(function () {
for (var key in _echarts) {
if (_echarts == null || !_echarts.hasOwnProperty(key) || key === 'default' || key === '__esModule') return;
exports[key] = _echarts[key];
}
})();
\ No newline at end of file
require("./lib/component/gridSimple");
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册