This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/next by this push:
new dbb3315 chore: watch zrender files change in dev.
dbb3315 is described below
commit dbb3315a15b61dace6af7a2fda889e3a24a7835d
Author: pissang <[email protected]>
AuthorDate: Mon Apr 27 23:13:47 2020 +0800
chore: watch zrender files change in dev.
---
build/build.js | 7 -------
build/config.js | 32 +++++++++++++-------------------
2 files changed, 13 insertions(+), 26 deletions(-)
diff --git a/build/build.js b/build/build.js
index 384831d..f88d256 100755
--- a/build/build.js
+++ b/build/build.js
@@ -314,7 +314,6 @@ async function build(configs) {
*/
function watch(singleConfig) {
- // FIXME:TS call `ensureZRenderCode`
let watcher = rollup.watch(singleConfig);
watcher.on('event', function (event) {
@@ -338,12 +337,6 @@ function watch(singleConfig) {
if (event.code === 'BUNDLE_END') {
printWatchResult(event);
}
- // if (event.code === 'START') {
- // ensureZRenderCode.prepare();
- // }
- // if (event.code === 'END' || event.code === 'ERROR' || event.code
=== 'FATAL') {
- // ensureZRenderCode.clear();
- // }
});
}
diff --git a/build/config.js b/build/config.js
index 688fbd3..1f1da3f 100644
--- a/build/config.js
+++ b/build/config.js
@@ -34,12 +34,6 @@ function preparePlugins(
{include, exclude}
) {
assert(include);
- // In case node_modules/zrender is a symlink
- const zrNodeModulePath = nodePath.resolve(ecDir, 'node_modules/zrender');
- const zrRealPath = fs.realpathSync(zrNodeModulePath);
- if (zrRealPath !== zrNodeModulePath) {
- include.push(zrRealPath + '/**/*.ts');
- }
if (clean) {
console.log('Built in clean mode without cache.');
@@ -140,14 +134,20 @@ exports.createECharts = function (opt = {}) {
output = nodePath.resolve(ecDir,
`dist/echarts${postfixLang}${postfixType}${postfixMin}.js`);
}
+ const include = [
+ nodePath.resolve(ecDir, 'src/**/*.ts'),
+ nodePath.resolve(ecDir, 'echarts*.ts')
+ ];
+ // In case node_modules/zrender is a symlink
+ const zrNodeModulePath = nodePath.resolve(ecDir, 'node_modules/zrender');
+ const zrRealPath = fs.realpathSync(zrNodeModulePath);
+ if (zrRealPath !== zrNodeModulePath) {
+ include.push(zrRealPath + '/**/*.ts');
+ }
+
return {
plugins: preparePlugins(opt, {
- include: [
- nodePath.resolve(ecDir, 'src/**/*.ts'),
- nodePath.resolve(ecDir, 'echarts*.ts')
- // nodePath.resolve(ecDir,
'/Users/s/sushuangwork/met/act/tigall/echarts/zrender/src/**/*.ts')
- // nodePath.resolve(ecDir, '../zrender/src/**/*.ts')
- ]
+ include
}),
// external: ['zrender'],
@@ -177,13 +177,7 @@ exports.createECharts = function (opt = {}) {
file: output
},
watch: {
- include: [
- nodePath.resolve(ecDir, 'src/**'),
- nodePath.resolve(ecDir, 'echarts*.ts'),
- // FIXME
- // zrender code watch is broken until "ensure zr code" can be
removed.
- // nodePath.resolve(ecDir, '../zrender/src/**/*.ts')
- ]
+ include
}
};
};
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]